#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long

using namespace std;

ll duplatrougla(const pair<ll, ll> &A, const pair<ll, ll> &B, const pair<ll, ll> &C){
    return(abs(A.first*(B.second-C.second) + B.first*(C.second-A.second) + C.first*(A.second-B.second)));
}

int main()
{
    ios_base::sync_with_stdio(false);

    int n;
    cin >> n;
    vector< pair<ll, ll> > tacka(n);
    for(int i = 0; i < n; i++){
        cin >> tacka[i].first >> tacka[i].second;
    }
    if(n == 4){
        ll pov1 = duplatrougla(tacka[0], tacka[1], tacka[2]);
        ll pov2 = duplatrougla(tacka[0], tacka[1], tacka[3]);
        ll pov3 = duplatrougla(tacka[0], tacka[2], tacka[3]);
        ll pov4 = duplatrougla(tacka[1], tacka[2], tacka[3]);
        ll mini = min( min(pov1, pov2), min(pov3, pov4) )/2;
        cout << mini << endl;
        return 0;
    }
    ll ukupnaPovrsina = 0;
    ll maksPovrsina = 0;
    for(int i = 0; i < n; i++){
        int ai = i-1, bi = i, ci = i+1;
        if(i == 0) ai = n-1;
        else if(i == n-1) ci = 0;
        ukupnaPovrsina += duplatrougla(tacka[0], tacka[bi], tacka[ci]);
        maksPovrsina = max(maksPovrsina, duplatrougla(tacka[ai], tacka[bi], tacka[ci]));
    }
    cout << (ukupnaPovrsina-maksPovrsina)/2 << endl;
    return 0;
}