#include <bits/stdc++.h>
using namespace std;
const char nl = '\n';
const long long INF = 0x3f3f3f3f;
const long long INFLL = 0x3f3f3f3f3f3f3f3f;
const long long MOD = 1e9 + 7;
const long double EPS = 1e-10;
template <class T>
ostream& operator<<(ostream& os, const pair<T, T>& v) {
  return os << '(' << v.first << ',' << v.second << ')';
}
struct Field {
  vector<pair<int, int> > points;
  void insert(int a, int b) { points.push_back(pair<int, int>(a + b, b - a)); }
  long long solve() {
    sort(points.begin(), points.end());
    int n = points.size();
    vector<int> upper(n + 1);
    vector<int> lower(n + 1);
    upper[n] = -INF;
    lower[n] = INF;
    for (int i = n - 1; i >= 0; i--) {
      upper[i] = max(points[i].second, upper[i + 1]);
      lower[i] = min(points[i].second, lower[i + 1]);
    }
    int ub = -INF;
    int lb = INF;
    int prevx = -INF;
    long long res = 0;
    for (int i = 0; i < n; i++) {
      if (min(ub, upper[i]) > max(lb, lower[i])) {
        res += (long long)((min(ub, upper[i]) - max(lb, lower[i])) / 2) *
               ((points[i].first - prevx) / 2);
      }
      ub = max(ub, points[i].second);
      lb = min(lb, points[i].second);
      prevx = points[i].first;
    }
    return res;
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
  int n;
  cin >> n;
  Field points[2];
  int a, b;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    points[((a + b) % 2 + 2) % 2].insert(a, b);
  }
  cout << points[0].solve() + points[1].solve() << nl;
  return 0;
}
