#include <bits/stdc++.h>
const long long N = 414514, inf = 0x3f3f3f3f3f3f3f3f;
typedef long long aN[N];
long long readll() {
  long long x = 0, w = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c - '-' || (w = -w), c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = x * 10 + (c ^ 48), c = getchar())
    ;
  return x * w;
}
int readchar() {
  char c = getchar();
  for (; c < 'A' || c > 'z'; c = getchar())
    ;
  return c;
}
struct pt {
  long long x, y;
  void read() { x = readll(), y = readll(); }
  operator long long() const { return x; }
} p[114514], *p1 = p, *p2, t;
long long solve(pt* p, long long n) {
  static long long hmx[1145141], hmn[1145141];
  std::sort(p + 1, p + n + 1);
  long long sum = 0, qmx = hmx[n + 1] = -inf, qmn = hmn[n + 1] = inf;
  for (register long long i = n; i >= 1; i--)
    hmx[i] = std::max(p[i].y, hmx[i + 1]),
    hmn[i] = std::min(p[i].y, hmn[i + 1]);
  for (register long long i = 1; i <= n; i++)
    sum += (p[i + 1].x - p[i].x) *
           std::max(0ll, std::min(qmx = std::max(p[i].y, qmx), hmx[i + 1]) -
                             std::max(qmn = std::min(p[i].y, qmn), hmn[i + 1]));
  return sum;
}
int main() {
  long long n = readll(), m = 0;
  p2 = p + n;
  for (register long long i = 1; i <= n; i++)
    t.read(), ((t.x ^ t.y) & 1 ? p1[++m] : *p2--) =
                  (pt){(t.x + t.y) >> 1, (t.x - t.y) >> 1};
  printf("%lld\n", solve(p1, m) + solve(p2, n - m));
  return 0;
}
