#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> za[500005];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    za[x + y + 250000].push_back(x - y);
  }
  for (int i = 0; i < 500005; i++) sort(za[i].begin(), za[i].end());
  multiset<int> S[2], T[2];
  for (int i = 0; i < 500005; i++) {
    for (int j = 0; j < za[i].size(); j++) {
      int rem = (za[i][j] % 2 + 2) % 2;
      T[rem].insert(za[i][j]);
    }
  }
  long long ans = 0;
  for (int i = 0; i < 500003; i++) {
    int rem = 1 - i % 2;
    if (!S[rem].empty() && !T[rem].empty()) {
      multiset<int>::iterator it = S[rem].begin();
      int smn = *it;
      it = S[rem].end();
      it--;
      int smx = *it;
      it = T[rem].begin();
      int tmn = *it;
      it = T[rem].end();
      it--;
      int tmx = *it;
      smn = max(smn, tmn);
      smx = min(smx, tmx);
      int lb, ub;
      if ((smn + 1 + 10000000) % 2 == i % 2)
        lb = smn + 1;
      else
        lb = smn + 2;
      if ((smx - 1 + 10000000) % 2 == i % 2)
        ub = smx - 1;
      else
        ub = smx - 2;
      ans += max(0, (ub - lb) / 2 + 1);
    }
    for (int j = 0; j < za[i].size(); j++) {
      S[1 - rem].insert(za[i][j]);
    }
    for (int j = 0; j < za[i + 1].size(); j++) {
      T[rem].erase(T[rem].find(za[i + 1][j]));
    }
  }
  cout << ans << endl;
}
