#include <bits/stdc++.h>
using namespace std;
const int MAXN = -1;
struct dot {
  long long x, y;
  dot(long long x = 0, long long y = 0) : x(x), y(y) {}
};
bool operator<(dot a, dot b) {
  return ((a.x + a.y) == (b.x + b.y) ? a.x < b.x : (a.x + a.y) < (b.x + b.y));
}
bool Amber(dot a, dot b) { return (a.x - a.y) < (b.x - b.y); }
multiset<dot> L, R;
long long getans(long long st, vector<dot> &V) {
  L.clear();
  R.clear();
  for (int i = (0); i < (int)(V.size()); i++) R.insert(V[i]);
  long long ans = 0;
  int p = 0;
  for (long long lim = -st; lim < st; lim += 2) {
    while (p < V.size() && (V[p].x - V[p].y < lim)) {
      L.insert(V[p]);
      R.erase(V[p]);
      p++;
    }
    if (L.empty() || R.empty()) {
      continue;
    }
    dot A = max(*L.begin(), *R.begin());
    long long l = A.x + A.y;
    dot B = min(*L.rbegin(), *R.rbegin());
    long long r = B.x + B.y;
    if (r < l) continue;
    ans += (r - l) / 2;
  }
  return ans;
}
int n;
vector<dot> B, W;
int main() {
  while (scanf("%d", &n) == 1) {
    B.clear();
    W.clear();
    for (int i = (0); i < (int)(n); i++) {
      dot T;
      scanf("%lld %lld", &T.x, &T.y);
      if ((T.x + T.y) % 2)
        B.push_back(T);
      else
        W.push_back(T);
    }
    sort(B.begin(), B.end(), Amber);
    sort(W.begin(), W.end(), Amber);
    long long ans = getans(200004, B) + getans(200005, W);
    printf("%lld\n", ans);
  }
  return 0;
}
