#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long inf = 0xc0c0c0c0c0c0c0c0;
const double pi = acos(-1);
const long long MAX = 1e5 + 7;
struct node {
  long long x, y;
  node(long long a = 0, long long b = 0) {
    x = a;
    y = b;
  }
};
bool operator<(node n1, node n2) { return n1.x < n2.x; }
node A[2][MAX];
long long C[2];
long long N;
long long up[MAX];
long long down[MAX];
long long pos[MAX];
long long M(multiset<long long> &S) {
  if (S.size() == 0)
    return inf;
  else
    return *S.rbegin();
}
long long m(multiset<long long> &S) {
  if (S.size() == 0)
    return INF;
  else
    return *S.begin();
}
void erase(multiset<long long> &S, long long x) { S.erase(S.find(x)); }
long long cal(long long w, long long h) {
  if (w < h) swap(w, h);
  if (h == 0) return 0;
  long long ww = (w + 1) >> 1;
  long long hh = (h + 1) >> 1;
  return ww * hh;
}
long long F(long long id) {
  if (C[id] < 4) return 0;
  sort(A[id], A[id] + C[id]);
  long long cnt = 0;
  long long i;
  long long last = inf;
  for (i = 0; i < C[id]; i++) {
    if (A[id][i].x != last) {
      pos[cnt] = last = A[id][i].x;
      up[cnt] = down[cnt] = A[id][i].y;
      cnt++;
    } else {
      up[cnt - 1] = max(up[cnt - 1], A[id][i].y);
      down[cnt - 1] = min(down[cnt - 1], A[id][i].y);
    }
  }
  multiset<long long> P, Q;
  for (i = 0; i < cnt; i++) {
    Q.insert(up[i]);
    Q.insert(down[i]);
  }
  long long ans = 0;
  last = inf;
  for (i = 0; i < cnt; i++) {
    long long w = pos[i] - last - 1;
    long long h = max(min(M(Q), M(P)) - max(m(P), m(Q)) - 1, 0ll);
    long long a1 = cal(w, h);
    ans += a1;
    last = pos[i];
    erase(Q, up[i]);
    erase(Q, down[i]);
    P.insert(up[i]);
    P.insert(down[i]);
  }
  return ans;
}
int main() {
  scanf("%lld", &N);
  long long i;
  for (i = 0; i < N; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    if ((x ^ y) & 1)
      A[0][C[0]++] = node(x + y, x - y);
    else
      A[1][C[1]++] = node(x + y, x - y);
  }
  printf("%lld\n", F(0) + F(1));
  return 0;
}
