#include <bits/stdc++.h>

using namespace std;

struct Koordinate
{
    long long x;
    long long y;
};

int main()
{
    int n;
    cin >> n;
    Koordinate tacka[n];

    for (int i = 0; i < n; i++)
    {
        cin >> tacka[i].x >> tacka[i].y;
    }

    long long P = 0, P1 = 0, P2 = 0, P3 = 0, P4 = 0;

    if (n == 4)
    {
        P1 = abs(tacka[0].x * (tacka[1].y - tacka[2].y) + tacka[1].x * (tacka[2].y - tacka[0].y) + tacka[2].x * (tacka[0].y - tacka[1].y)) / 2;
        P2 = abs(tacka[0].x * (tacka[1].y - tacka[3].y) + tacka[1].x * (tacka[3].y - tacka[0].y) + tacka[3].x * (tacka[0].y - tacka[1].y)) / 2;
        P3 = abs(tacka[0].x * (tacka[2].y - tacka[3].y) + tacka[2].x * (tacka[3].y - tacka[0].y) + tacka[3].x * (tacka[0].y - tacka[2].y)) / 2;
        P4 = abs(tacka[1].x * (tacka[2].y - tacka[3].y) + tacka[2].x * (tacka[3].y - tacka[1].y) + tacka[3].x * (tacka[1].y - tacka[2].y)) / 2;
        P = min(P1, min(P2, min(P3, P4)));
    }

    else
    {
        for (int i = 0; i < n; i++)
        {
            long long suma = 0;
            for (int j = 0; j < n; j++)
            {
                if (j != i)
                {
                    suma += tacka[j].x * (tacka[(j + 1) % n].y - tacka[(j + n - 1) % n].y);
                }
            }
            P = min(P, abs(suma) / 2);
        }
    }

    cout << P << endl;

    return 0;
}