#include <iostream>
#include <bits/stdc++.h>
#include <string>
typedef unsigned long long int ull;
typedef long long int ll;
using namespace std;

ll p(ll ax, ll ay, ll bx, ll by, ll cx, ll cy)
{
    return abs((ax*(cy - by) + bx*(ay - cy) + cx*(by - ay))/2);
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cerr.tie(0);
    ll N, i, najmanja;
    cin >> N;
    ll x[N];
    ll y[N];
    for(i=0; i<N; i++)
    {
        cin >> x[i] >> y[i];
    }
    if(N == 4)
    {
        najmanja = min(p(x[0], y[0], x[1], y[1], x[2], y[2]),
                          min(p(x[0], y[0], x[1], y[1], x[3], y[3]),
                          min(p(x[0], y[0], x[2], y[2], x[3], y[3]),
                          p(x[1], y[1], x[2], y[2], x[3], y[3]))));
        cout << najmanja << endl;
    }
    else
    {
        ll ukupno = 0;
        ll x_unutra = (x[0] + x[1])/2;
        ll y_unutra = (y[0] + y[1])/2;
        for(i=0; i<N-1; i++)
        {
            ukupno += p(x_unutra, y_unutra, x[i], y[i], x[i+1], y[i+1]);
        }
        ukupno += p(x_unutra, y_unutra, x[N-1], y[N-1], x[0], y[0]);

        najmanja = ukupno - p(x[N-2], y[N-2], x[N-1], y[N-1], x[0], y[0]);
        if((ukupno - p(x[N-1], y[N-1], x[0], y[0], x[1], y[1])) < najmanja)
        {
            najmanja = ukupno - p(x[N-1], y[N-1], x[0], y[0], x[1], y[1]);
        }
        for(i=0; i<N-2; i++)
        {
            if((ukupno - p(x[i], y[i], x[i+1], y[i+1], x[i+2], y[i+2])) < najmanja)
            {
                najmanja = ukupno - p(x[i], y[i], x[i+1], y[i+1], x[i+2], y[i+2]);
            }
        }
        cout << najmanja << endl;


    }
}