#include <bits/stdc++.h>
#define ll long double
#define pi pair<int, int>
#define pb push_back

using namespace std;

struct tacka
{
    ll x;
    ll y;
};


ll povrsina(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3)
{
    ll a = sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
    ll b = sqrt((x1-x3)*(x1-x3)+(y1-y3)*(y1-y3));
    ll c = sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
    ll s=(a+b+c)/2;
    return sqrt(s*(s-a)*(s-b)*(s-c));
}
ll povrsina2(tacka t1, tacka t2, tacka t3)
{
    return povrsina(t1.x, t1.y, t2.x, t2.y, t3.x, t3.y);
}



int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin>>n;
    if(n==4)
    {
        ll x1, x2, x3, x4, y1, y2, y3, y4;
        cin>>x1>>y1;
        cin>>x2>>y2;
        cin>>x3>>y3;
        cin>>x4>>y4;
        ll res=min(min(povrsina(x1, y1, x2, y2, x3, y3), povrsina(x4, y4, x2, y2, x3, y3)),
                  min(povrsina(x1, y1, x4, y4, x3, y3), povrsina(x1, y1, x2, y2, x4, y4)));
        unsigned long long int ispis=res;
        cout<<ispis;
    }
    else
    {
        tacka niz[n+1];
        ll xi, yi;
        for(int i=1; i<n+1; i++)
        {
            cin>>xi>>yi;
            niz[i].x=xi;
            niz[i].y=yi;
        }
        ll Pu=0;
        ll maks=0;
        ll dodatak;
        for(int i=1; i<n-1; i+=2)
        {
            dodatak=povrsina2(niz[i], niz[i+1], niz[i+2]);
            Pu=Pu+dodatak;
            if(dodatak>maks) maks=dodatak;
        }
        if(n%2==0)
        {
            dodatak=povrsina2(niz[n-1], niz[n], niz[1]);
            Pu+=dodatak;
            if(dodatak>maks) maks=dodatak;
        }
        for(int i=3; i<n-1; i+=2)
        {
            Pu+=povrsina2(niz[1], niz[i], niz[i+2]);
        }
        ll res=Pu-maks;
        unsigned long long int ispis=res;
        cout<<ispis;
    }
}
/*
6
4 18
2 4
8 4
16 6
18 10
6 18
*/