#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define endl "\n"
ll P(vector<ll> xevi,vector<ll> yevi, int n){
    ll p=0LL;
    int j = n - 1;
    for(int i=0;i<n;i++){
        p+=(0LL+xevi[j]+xevi[i])*(0LL+yevi[j]-yevi[i]);
        j=i;
    }
    return abs(p/2LL);
}
int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);
    int n;cin>>n;ll mini=0LL;
    vector<ll>x(n),y(n);
    for(int i=0;i<n;i++){cin>>x[i]>>y[i];}
    //za n=4, nije htelo za vise :[
    if(n==4){
        mini=min({P({x[0],x[1],x[2]},{y[0],y[1],y[2]},3),P({x[0],x[1],x[3]},{y[0],y[1],y[3]},3),
            P({x[0],x[2],x[3]},{y[0],y[2],y[3]},3),P({x[1],x[2],x[3]},{y[1],y[2],y[3]},3)});
        cout<<mini<<endl;
        return 0;
    }
    else{
        ll povrsina=P(x,y,n);ll mx=0LL;
        for(int i=0;i<n;i++){
            ll tr=0LL;
            int pret=(i-1+n)%n;
            int sled=(i+1+n)%n;
            mx=P({x[pret],x[i],x[sled]},{y[pret],y[i],y[sled]},3);
            mx=max(mx,tr);
        }
        cout<<povrsina-mx;
    }
    return 0;
}