#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int m, r = 0;
    cin >> m;
    int x[m],y[m];
    for(int i = 0; i < m; i++)
    {
        cin>> x[i] >> y[i];
    }
    xmin = min (x[0], x[1]);
    ymin = min (y[0], y[1]);
    for (int i = 2; i < m; i++)
    {
        xmin = min (xmin,x[i]);
        ymin = min (ymin,y[i]);
    }
    for (int i = 0; i < m; i++)
    {
        r = r + abs(xmin - x[i]) * abs(ymin - y[i]);
    }
    cout << r << endl;
    return 0;
}