#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
template <class T>
inline bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
const ll MOD = 1e9 + 7;
ll solve(vector<pii> ps) {
  int n = ps.size();
  ;
  const int N = 202345;
  vv<int> xs(212345);
  for (auto p : ps) xs[p.second].push_back(p.first);
  vector<int> ltl(212345), ltr(212345);
  {
    int l = MOD, r = -MOD;
    for (int(i) = 0; (i) < (N); ++(i)) {
      ltl[i] = l;
      ltr[i] = r;
      for (auto x : xs[i]) {
        MN(l, x);
        MX(r, x);
      }
    }
  }
  vector<int> gel(212345), ger(212345);
  {
    int l = MOD, r = -MOD;
    for (int(i) = (N)-1; (i) >= 0; --(i)) {
      for (auto x : xs[i]) {
        MN(l, x);
        MX(r, x);
      }
      gel[i] = l;
      ger[i] = r;
    }
  }
  ll re = 0;
  for (int(y) = 0; (y) < (N); ++(y)) {
    if (ltl[y] > ltr[y]) continue;
    if (gel[y] > ger[y]) continue;
    re += max(0, min(ltr[y], ger[y]) - max(ltl[y], gel[y]));
  }
  return re;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(0);
  int n;
  cin >> n;
  vector<pii> ps(n);
  for (auto &p : ps) cin >> p.first >> p.second;
  vv<pii> vs(2);
  for (auto p : ps) {
    int x = p.first + p.second + 200000;
    int y = p.first - p.second + 200000;
    vs[x % 2].emplace_back(x / 2, y / 2);
  }
  ll re = 0;
  for (int(i) = 0; (i) < (2); ++(i)) re += solve(vs[i]);
  cout << re << "\n";
  return 0;
}
