#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#define ll long long

using namespace std;

ll povrsina(ll x1, ll y1, ll x2, ll y2, ll x3, ll y3){
    return abs(x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2;
}

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

    ll n; cin >> n;
    vector<pair<ll, ll>> tacke(n);

    for (ll i = 0; i < n; i++) {
        cin >> tacke[i].first >> tacke[i].second;
    }

    ll najpP = 0;
    bool unutra = false;

    if (n == 4) {
        ll P1 = povrsina(tacke[0].first, tacke[0].second, tacke[1].first, tacke[1].second, tacke[2].first, tacke[2].second);
        ll P2 = povrsina(tacke[0].first, tacke[0].second, tacke[1].first, tacke[1].second, tacke[3].first, tacke[3].second);
        ll P3 = povrsina(tacke[0].first, tacke[0].second, tacke[2].first, tacke[2].second, tacke[3].first, tacke[3].second);
        ll P4 = povrsina(tacke[1].first, tacke[1].second, tacke[2].first, tacke[2].second, tacke[3].first, tacke[3].second);

        if (P1 + P2 + P3 == P4) {
            unutra = true;
            najpP = min(P1, min(P2, P3));
        }
        else if (P1 + P2 + P4 == P3) {
            unutra = true;
            najpP = min(P1, min(P2, P4));
        }
        else if (P1 + P3 + P4 == P2) {
            unutra = true;
            najpP = min(P1, min(P3, P4));
        }
        else if (P2 + P3 + P4 == P1) {
            unutra = true;
            najpP = min(P2, min(P3, P4));
        }
        else najpP = min(P2, min(P3, min(P4,P1)));
    }

    ll P = 0;
    for (ll i = 1; i < n; i++) {
        P += (tacke[i - 1].first * tacke[i].second) - (tacke[i].first * tacke[i - 1].second);
    }
    P = abs(P) / 2;

    if (n>4) {
        for (ll i = 0; i < n; i++) {
            ll p1 = 0;
            if (i == 0) {
                p1 = P - povrsina(tacke[0].first, tacke[0].second, tacke[1].first, tacke[1].second, tacke[2].first, tacke[2].second);
            }
            else if (i == n - 1) {
                p1 = P - povrsina(tacke[0].first, tacke[0].second, tacke[1].first, tacke[1].second, tacke[n-1].first, tacke[n-1].second);
            }
            else {
                p1 = P - povrsina(tacke[i - 1].first, tacke[i - 1].second, tacke[i].first, tacke[i].second, tacke[i + 1].first, tacke[i + 1].second);
            }
            if (p1 > najpP) najpP = p1;
        }
    }

    cout << najpP << endl;

    return 0;
}