#include <iostream>
#include <vector>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int N;
	cin >> N;
	vector<pair<long, long>> points(N);
	for (int i = 0;i < N;i++) {
		cin >> points[i].first >> points[i].second;
	}
	if (N == 4) {
		unsigned long long t[4];
		for (int i = 0;i < N;i++) {
			long long x1 = points[i].first, y1 = points[i].second, 
				x2 = points[(i + 1) % N].first, y2 = points[(i + 1) % N].second,
				x3 = points[(i + 2) % N].first, y3 = points[(i + 2) % N].second;
			t[i] = abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2;
		}
		cout << min(min(min(t[0], t[1]), t[2]), t[3]);
	}
	else {
		long long t = 0;
		for (int i = 0;i < N;i++) {
			t += (points[i].first * points[(i + 1) % N].second - points[i% N].second * points[(i + 1) % N].first) / 2;
		}
		cout << abs(t);
	}
}