#include <iostream>
#include <cmath>
#include <list>
#include <vector>
#include <algorithm>
#include <bitset>
#include <string>
#include <set>
#include <map>
#include <queue>
#define ll int64_t
#define int int64_t
#define VI vector<ll>
#define rep(i,a,b) for (int i=a;i<=b;i++)
#define per(i,a,b) for (int i=a;i>=b;i--)
#define load(a) for (auto& x : a) cin >> x
#define unload(a) for(auto x: a) cout << x << " "

using namespace std;
const int N = 2e5+20; ll A[N], n;

void solve(){
    cin >> n;
    pair<ll,ll> tacke[n];
    rep(i,0,n-1){
        cin >> tacke[i].first >> tacke[i].second;
    }
    ll povrsina = 0;
    rep(i,1,n-2){
        ll x1 = tacke[0].first;
        ll y1 = tacke[0].second;
        ll x2 = tacke[i].first;
        ll y2 = tacke[i].second;
        ll x3 = tacke[i+1].first;
        ll y3 = tacke[i+1].second;
        ll p = abs( (x1*(y2-y3)) + (x2*(y3-y1)) + (x3*(y1-y2)) ) / 2;
        povrsina += p;
    }
    ll ans = 1000000000000000000;
    rep(i,0,n-1){
        ll x1 = tacke[i].first;
        ll y1 = tacke[i].second;
        ll x2 = tacke[(i+1 + n)%n].first;
        ll y2 = tacke[(i+1 + n)%n].second;
        ll x3 = tacke[(i-1 + n)%n].first;
        ll y3 = tacke[(i-1 + n)%n].second;

        ll oduzimanje = abs( (x1*(y2-y3)) + (x2*(y3-y1)) + (x3*(y1-y2)) ) / 2;
        ans = min(ans, povrsina - oduzimanje);
    }
    cout << ans << endl;

    return;
}

int32_t main() {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    solve();
    return 0;
}