#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<stack> 
#include<queue>
#include<cmath>
#include<map>
#define LL long long
#define N 200100
#define M 1010
#define MOD 1000000007
#define FOR(i,l,r) for (int i = (l); i <= (r); i ++)
#define CLR(a,x) memset(a,x,sizeof(a))
#define INF 0x7fffffff
#define ALL(x) x.begin(),x.end()
#define pb push_back
#define X first
#define Y second
using namespace std;
typedef unsigned long long ULL;
struct Point{
	LL x,y;
	Point() {}
	Point(LL _x,LL _y):x(_x),y(_y) {}
	Point operator - (const Point &rhs) const{
 	    return Point(x - rhs.x,y - rhs.y);
	}
}p[N];
ULL ls[N],rs[N];
LL low[N],up[N];
int n;
vector<LL> all;
LL Cross(Point a,Point b){
	return (LL)a.x * b.y - (LL)b.x * a.y;
}
LL q1[N],q2[N];
int cmp(Point a,Point b){
	if (a.x != b.x) return a.x < b.x;
	else return a.y < b.y;
}
int check(int x,int y,int z){
	Point t1 = p[y] - p[x];
	Point t2 = p[z] - p[y];
	if (Cross(t1,t2) <= 0) return 1;
	else return 0;
}
LL area(int x,int y,int z){
	Point t1 = p[y] - p[x];
	Point t2 = p[z] - p[y];
	return abs(Cross(t1,t2));
}
ULL work(ULL a,ULL b,ULL c){
	return (a + c) * b;
}
int solve_left(){
	int r1,r2;
	r1 = 1;r2 = 1;
	int cur = 1;
	while (p[cur].x == p[1].x && cur <= n) cur ++;
	low[0] = p[1].y;up[0] = p[cur - 1].y;ls[0] = 0;
	q1[1] = 1;q2[1] = cur - 1;
	for (int i = cur; i <= n; i ++){
		int j = i;
		int k = lower_bound(all.begin(),all.end(),p[i].x) - all.begin();
		while (j + 1 <= n && p[j + 1].x == p[i].x) j ++;
		low[k] = p[i].y;up[k] = p[j].y;
		ls[k] = ls[k - 1] + work(up[k - 1] - low[k - 1],(ULL)(all[k] - all[k - 1]),up[k] - low[k]);
		while (1 < r1 && check(q1[r1 - 1],q1[r1],i)){
			//cout << check(q1[r1 - 1],q1[r1],i) << endl;
			ls[k] += (ULL)area(q1[r1 - 1],q1[r1],i);
			r1 --;
		}
		q1[++ r1] = i;
		while (1 < r2 && !check(q2[r2 - 1],q2[r2],j)){
			ls[k] += (ULL)area(q2[r2 - 1],q2[r2],j);
			r2 --;
		}
		q2[++ r2] = j;
		i = j;
	}
	return 0;
}
int solve_right(){
	int r1,r2;
	r1 = 1;r2 = 1;
	int cur = n;
	while (p[cur].x == p[n].x && cur >= 1) cur --;
	int k = lower_bound(all.begin(),all.end(),p[n].x) - all.begin();
	up[k] = p[n].y;low[k] = p[cur + 1].y;rs[k] = 0;
	q1[1] = cur + 1;q2[1] = n;
	for (int i = cur; i >= 1; i --){
		int j = i;
		int k = lower_bound(all.begin(),all.end(),p[i].x) - all.begin();
		while (j - 1 >= 1 && p[j - 1].x == p[i].x) j --;
		up[k] = p[i].y;low[k] = p[j].y;
		rs[k] = rs[k + 1] + work(up[k + 1] - low[k + 1],(ULL)(all[k + 1] - all[k]),up[k] - low[k]);
		while (1 < r1 && !check(q1[r1 - 1],q1[r1],j)){
			rs[k] += (ULL)area(q1[r1 - 1],q1[r1],j);
			r1 --;
		}
		q1[++ r1] = j;
		while (1 < r2 && check(q2[r2 - 1],q2[r2],i)){
			rs[k] += (ULL)area(q2[r2 - 1],q2[r2],i);
			r2 --;
		}
		q2[++ r2] = i;
		i = j;
	}
	return 0;
}
int main(){
	scanf("%d",&n);
	for (int i = 1; i <= n; i ++){
		scanf("%lld%lld",&p[i].x,&p[i].y);
		all.pb(p[i].x);
	}
	sort(all.begin(),all.end());
	all.erase(unique(all.begin(),all.end()),all.end());
	sort(p + 1,p + n + 1,cmp);
	solve_left();
	solve_right();
	//for (int i = 0; i < all.size(); i ++) printf("i = %d,ls = %I64d,rs = %I64d\n",i,ls[i],rs[i]);
	ULL ans = -1;
	//cout << INF << endl;
	//cout << ans << endl;
	for (int i = 0; i < all.size() - 1; i ++)
		ans = min(ans,ls[i] + rs[i + 1]);
	cout << (ans + 1) / 2 << endl;
	//printf("%llu\n",(ans + 1) / 2);
}

Measured memory_bytes: 9860