#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lf = long double;
using pii = pair<int, int>;
using ppi = pair<int, pii>;
using pll = pair<ll, ll>;
using pff = pair<lf, lf>;
using ti = tuple<int, int, int>;
using base = complex<double>;
const lf PI = 3.14159265358979323846264338L;
template <typename T>
inline T umax(T& u, T v) {
  return u = max(u, v);
}
template <typename T>
inline T umin(T& u, T v) {
  return u = min(u, v);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
const int o = 2e5;
set<pii> C[2][2];
vector<pii> P[2];
int n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  cin >> n;
  for (int i = 1, x, y; i <= n; i++) {
    cin >> x >> y;
    pii p(x + y + o, x - y + o);
    C[(x + y) & 1][1].emplace(p);
    P[(x + y) & 1].emplace_back(p);
  }
  for (int b = 0; b < 2; b++) {
    sort((P[b]).begin(), (P[b]).end(), [](pii u, pii v) {
      return pii(u.second, u.first) > pii(v.second, v.first);
    });
  }
  42;
  for (pii a : P[0]) {
    int x = (a.first + a.second) / 2 - o;
    int y = (a.first - a.second) / 2;
    42;
  }
  42;
  for (pii a : P[1]) {
    int x = (a.first + a.second) / 2 - o;
    int y = (a.first - a.second) / 2;
    42;
  }
  ll ans = 0;
  for (int i = 0; i <= o + o; i++) {
    int w = i & 1;
    while (((int)(P[!w]).size()) && P[!w].back().second < i) {
      42;
      C[!w][1].erase(P[!w].back());
      C[!w][0].insert(P[!w].back());
      P[!w].pop_back();
    }
    if (((int)(C[!w][0]).size()) < 2 || ((int)(C[!w][1]).size()) < 2) continue;
    int l = max(C[!w][0].begin()->first, C[!w][1].begin()->first);
    int r = min(C[!w][0].rbegin()->first, C[!w][1].rbegin()->first);
    42;
    ll lans = max(0, (r - l) / 2);
    ans += lans;
  }
  cout << ans << '\n';
}
