#include <bits/stdc++.h>
#define ll             long long
#define pi             pair <int,int>
#define pl             pair <ll,ll>
#define ps             pair <string,string>
#define vi             vector <int>
#define vl             vector <ll>
#define vpi            vector <pi>
#define vpl            vector <pl>
#define f(i,a,b)       for(ll i=(a);i<(b);i++)
#define fd(i,a,b)      for(ll i=(a);i>(b);i--)
#define si(a)          scanf("%d",&a)
#define sii(a,b)       scanf("%d %d",&a,&b)
#define siii(a,b,c)    scanf("%d %d %d",&a,&b,&c)
#define sl(a)          scanf("%lld",&a)
#define sll(a,b)       scanf("%lld %lld",&a,&b)
#define slll(a,b,c)    scanf("%lld %lld %lld",&a,&b,&c)
#define sd(a)          scanf("%lf",&a)
#define sdd(a,b)       scanf("%lf %lf",&a,&b)
#define sddd(a,b,c)    scanf("%lf %lf %lf",&a,&b,&c)
#define x first
#define y second
#define ss(s)          scanf("%s",s)
#define pf             printf
#define pfi(n)         printf("%d\n",n)
#define pfl(n)         printf("%lld\n",n)
#define pfls(n)        printf("%lld ",n)
#define pfci(n,ans)    printf("Case %lld: %d\n",n,ans)
#define pfcl(n,ans)    printf("Case %lld: %lld\n",n,ans)
#define pfcd(n,ans)    printf("Case %lld: %lf\n",n,ans)
#define pb             push_back
#define all(v)         v.begin(),v.end()
#define mem(a,v)       memset(a,v,sizeof(a))
#define MAX 100007
#define MOD 10007
#define INF 1e12
#define LG  16
#define mid ((l+r)/2)
#define PI (acos(-1.0))
#define ppl pair<pl,ll>
#define id(i,j,n) (n*(i-1)+j)
#define IN(n) (2*(n)-1)
#define OUT(n) (2*(n))
using namespace std;

ll cross(pl a,pl b){
    return a.x*b.y-a.y*b.x;
}

ll getArea(pl a,pl b,pl c){
    pl ab=pl(b.x-a.x,b.y-a.y);
    pl ac=pl(c.x-a.x,c.y-a.y);
    return cross(ab,ac);
}
vector <ll> X;
map <ll,ll> mn, mx;

map <ll,ll> A, B;

void prnt(pl a){
    cout<<"("<<a.x<<','<<a.y<<") ";
}

void getF(){
    vector <pl> U, D;
    U.pb(pl(X[0],mx[X[0]]));
    D.pb(pl(X[0],mn[X[0]]));
    A[X[0]]=0;
    f(i,1,X.size()){
        A[X[i]]=A[X[i-1]];
        pl p1=pl(X[i],mn[X[i]]), p2=pl(X[i],mx[X[i]]);
        A[X[i]]+=abs(getArea(U.back(),p1,p2));
        A[X[i]]+=abs(getArea(D.back(),U.back(),p1));
        while (U.size() > 1 && getArea(p2,U[U.size()-2], U.back()) >= 0){
            A[X[i]]+=abs(getArea(p2,U[U.size()-2], U.back()));
            U.pop_back();
        }
        U.push_back(p2);
        while (D.size() > 1 && getArea(p1,D[D.size()-2], D.back()) <= 0){
            A[X[i]]+=abs(getArea(p1,D[D.size()-2], D.back()));
            D.pop_back();
        }
        D.push_back(p1);
//        cout<<"Upper = ";
//        f(i,0,U.size()) prnt(U[i]);
//        cout<<"Lower = ";
//        f(i,0,D.size()) prnt(D[i]);
//        cout<<endl;
    }
}

void getR(){
//    cout<<"Rev "<<endl;
    reverse(all(X));
    vector <pl> U, D;
    U.pb(pl(X[0],mx[X[0]]));
    D.pb(pl(X[0],mn[X[0]]));
    B[X[0]]=0;
    f(i,1,X.size()){
        B[X[i]]=B[X[i-1]];
        pl p1=pl(X[i],mn[X[i]]), p2=pl(X[i],mx[X[i]]);
        B[X[i]]+=abs(getArea(U.back(),p1,p2));
        B[X[i]]+=abs(getArea(D.back(),U.back(),p1));
        while (U.size() > 1 && getArea(p2,U[U.size()-2], U.back()) <= 0){
            B[X[i]]+=abs(getArea(p2,U[U.size()-2], U.back()));
            U.pop_back();
        }
        U.push_back(p2);
        while (D.size() > 1 && getArea(p1,D[D.size()-2], D.back()) >= 0){
            B[X[i]]+=abs(getArea(p1,D[D.size()-2], D.back()));
            D.pop_back();
        }
        D.push_back(p1);
//        cout<<"Upper = ";
//        f(i,0,U.size()) prnt(U[i]);
//        cout<<"Lower = ";
//        f(i,0,D.size()) prnt(D[i]);
//        cout<<endl;
    }
}

int main(){
    ll N;
    sl(N);
    f(i,0,N){
        ll a,b;
        sll(a,b);
        if(mn.find(a)==mn.end()) mn[a]=b;
        else mn[a]=min(mn[a],b);
        if(mx.find(a)==mx.end()) mx[a]=b;
        else mx[a]=max(mx[a],b);
    }
    for(map <ll,ll> :: iterator it=mn.begin(); it!=mn.end(); it++) X.pb(it->x);
    sort(all(X));

    getF();
    getR();

//    f(i,0,X.size()){
//        cout<<X[i]<<' '<<mn[X[i]]<<' '<<mx[X[i]]<<' '<<A[X[i]]<<' '<<B[X[i]]<<endl;
//    }
    ll ans=min(A[X[0]],B[X[X.size()-1]]);
    f(i,1,X.size()){
        ans=min(ans,B[X[i-1]]+A[X[i]]);
    }
    pfl((ans+1)/2);
}

Measured memory_bytes: 30116