#include <iostream>
#include<cmath>
#include<algorithm>

using namespace std;

struct Teme
{
    long long x,y;
};
Teme Ref;
int orijentacija(Teme a, Teme b, Teme c)
{
    int O=(b.y-a.y)*(c.x-b.x)-(c.y-b.y)*(b.x-a.x);
    if(O>0)return 1;
    return 2;
}
bool uporedi(Teme t1, Teme t2) 
{
    return orijentacija(Ref,t1,t2)==2;
}
long long PovrsinaNTougla(Teme t[], int n)
{
    long long pov=0;
    for(int i=0;i<n;i++)
    {
        int j=(i+1)%n;
        pov+=t[i].x*t[j].y-t[i].y*t[j].x;
    }
    return abs(pov)/2;
};
long long PovrsinaTrougla(Teme a, Teme b, Teme c)
{
    return abs(a.x*(b.y-c.y) + b.x*(c.y-a.y)+c.x*(a.y-b.y))/2;
}
int main() {
    int n;
    scanf("%d", &n);
    Teme t[n];
    scanf("%lld %lld", &t[0].x, &t[0].y);
    int miny=0;
    for (int i=1;i<n;i++)
    {
        scanf("%lld %lld", &t[i].x, &t[i].y);
        if(t[i].y<t[miny].y || (t[i].y==t[miny].y && t[i].x<t[miny].x))miny=i;
    }
    swap(t[0],t[miny]);
    Ref=t[0];
    if(n==4)
    {
        long long minpov = min(PovrsinaTrougla(t[0],t[1],t[2]), PovrsinaTrougla(t[1],t[2],t[3]));
        minpov = min(minpov, PovrsinaTrougla(t[2],t[3],t[0]));
        minpov = min(minpov, PovrsinaTrougla(t[3],t[0],t[1]));
        printf("%lld\n", minpov);
    }
    else
    {
        sort(t+1,t+n,uporedi);
        long long pov=PovrsinaNTougla(t,n);
        long long MaxPovT=-1;
        for(int i=0;i<n;i++)
        {
            MaxPovT=max(MaxPovT,PovrsinaTrougla(t[i],t[(i+1)%n],t[(i+2)%n]));
        }
        pov-=MaxPovT;
        printf("%lld\n",pov);
    }
    return 0;
}