#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 60;
int n, x[N], y[N];
struct P {
  int x, y;
};
long long ans;
bool operator<(const P &l, const P &r) { return l.x < r.x; }
void solve(int odd) {
  vector<P> a;
  multiset<int> l, r;
  for (int i = 1; i <= (n); ++i) {
    if (abs((x[i] + y[i]) % 2) == odd) {
      a.push_back((P){(x[i] + y[i] + odd) / 2, (x[i] - y[i] + odd) / 2});
    }
  }
  sort(a.begin(), a.end());
  if (a.size() == 0) return;
  auto p = a.begin();
  for (auto t : a) r.insert(t.y);
  for (int now = a.front().x; now < a.back().x; ++now) {
    for (; p != a.end() && p->x <= now; ++p) {
      l.insert(p->y);
      r.erase(r.find(p->y));
    }
    if (l.empty() || r.empty()) continue;
    int ls = *l.begin(), lt = *(--l.end());
    int rs = *r.begin(), rt = *(--r.end());
    ans += max(0, min(lt, rt) - max(ls, rs));
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d%d", x + i, y + i);
  solve(0), solve(1);
  printf("%lld\n", ans);
  return 0;
}
