#include <bits/stdc++.h>
using namespace std;
using ld = long double;
const ld eps = 1e-8, pi = acos(-1.0);

bool eq(ld a, ld b) {
	return abs(a - b) < eps;
}

using Point = complex<ld>;

class Line {
public:
	Point a, b;
};

ld dot(Point a, Point b) {
	return real(conj(a) * b);
}

ld cross(Point a, Point b) {
	return imag(conj(a) * b);
}

int ccw(Point a, Point b, Point c) {
	b -= a, c -= a;
	if (cross(b, c) > eps) return 1;	// a,b,c??????????¨???¨???
	if (cross(b, c) < -eps) return -1;	// a,b,c???????¨???????
	if (dot(b, c) < 0) return 2;		// c,a,b????????§??´???
	if (norm(b) < norm(c)) return -2;	// a,b,c???????????´???
	return 0;							// a,c,b???????????´???
}

bool isis_ll(Line l, Line m) {
	return abs(cross(l.b - l.a, m.b - m.a)) > eps;
}

bool isis_ls(Line l, Line s) {
	return (cross(l.b - l.a, s.a - l.a) * cross(l.b - l.a, s.b - l.a) < eps);
}

bool isis_lp(Line l, Point p) {
	return abs(cross(l.b - p, l.a - p)) < eps;
}

bool isis_sp(Line s, Point p) {
	return abs(s.a - p) + abs(s.b - p) - abs(s.b - s.a) < eps;
}

Point proj(Line l, Point p) {
	ld t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
	return l.a + t * (l.a - l.b);
}

Point is_ll(Line s, Line t) {
	Point sv = s.b - s.a, tv = t.b - t.a;
	assert(cross(sv, tv) != 0);
	return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}

bool isis_ss(Line s, Line t) {
	if (isis_ll(s, t)) return isis_ls(s, t) && isis_ls(t, s);
	return isis_sp(s, t.a) || isis_sp(s, t.b) || isis_sp(t, s.a);
}

ld dist_lp(Line l, Point p) {
	return abs(p - proj(l, p));
}

ld dist_ll(Line l, Line m) {
	return isis_ll(l, m) ? 0 : dist_lp(l, m.a);
}

ld dist_ls(Line l, Line s) {
	return isis_ls(l, s) ? 0 : min(dist_lp(l, s.a), dist_lp(l, s.b));
}

ld dist_sp(Line s, Point p) {
	Point r = proj(s, p);
	return isis_sp(s, r) ? abs(r - p) : min(abs(s.a - p), abs(s.b - p));
}

ld dist_ss(Line s, Line t) {
	if (isis_ss(s, t)) return 0;
	return min({ dist_sp(s, t.a), dist_sp(s, t.b), dist_sp(t, s.a), dist_sp(t, s.b) });
}

ld triangle(Point p1, Point p2, Point p3) {
	return abs(cross(p2 - p1, p3 - p1)) / 2.0;
}

int main()
{
	int N;
	cin >> N;
	vector<int> x(N), y(N);
	vector<pair<int, int>> xy(N);
	for (int i = 0; i < N; i++) {
		cin >> x[i] >> y[i];
		xy[i] = pair<int, int>(x[i], y[i]);
	}
	sort(xy.begin(), xy.end());
	vector<Point> v;
	for (int i = 0; i < N; i++) {
		x[i] = xy[i].first;
		y[i] = xy[i].second;
		v.push_back(Point(x[i], y[i]));
	}
	vector<ld> S(N), rS(N);
	vector<Point> us, ls; us.push_back(v[0]); ls.push_back(v[0]);
	ld s = 0;
	for (int i = 1; i < N; i++) {
		while ((int)us.size() >= 2 && ccw(us[(int)us.size() - 2], us[(int)us.size() - 1], v[i]) == 1) {
			s -= triangle(us[(int)us.size() - 2], us[(int)us.size() - 1], ls.back());
			us.pop_back();
		}
		while ((int)ls.size() >= 2 && ccw(ls[(int)ls.size() - 2], ls[(int)ls.size() - 1], v[i]) == -1) {
			s -= triangle(ls[(int)ls.size() - 2], ls[(int)ls.size() - 1], us.back());
			ls.pop_back();
		}
		s += triangle(v[i], us.back(), ls.back());
		S[i] = s;
		us.push_back(v[i]);
		ls.push_back(v[i]);
	}
	us.clear(), ls.clear();
	us.push_back(v[N - 1]), ls.push_back(v[N - 1]);
	s = 0;
	for (int i = N - 2; i >= 0; i--) {
		while ((int)us.size() >= 2 && ccw(us[(int)us.size() - 2], us[(int)us.size() - 1], v[i]) == -1) {
			s -= triangle(us[(int)us.size() - 2], us[(int)us.size() - 1], ls.back());
			us.pop_back();
		}
		while ((int)ls.size() >= 2 && ccw(ls[(int)ls.size() - 2], ls[(int)ls.size() - 1], v[i]) == 1) {
			s -= triangle(ls[(int)ls.size() - 2], ls[(int)ls.size() - 1], us.back());
			ls.pop_back();
		}
		s += triangle(v[i], us.back(), ls.back());
		rS[i] = s;
		us.push_back(v[i]);
		ls.push_back(v[i]);
	}
	ld res = N < 4 ? (ld)0.0 : S[1] + rS[2];
	for (int i = 2; i < N; i++) {
		if (x[i - 1] != x[i]) {
			res = min(res, S[i - 1] + rS[i]);
		}
	}
	cout << (long long)roundl(res) << endl;
	return 0;
}

Measured memory_bytes: 20152