#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
struct P {
  int x, y;
  bool operator<(const P &p) const { return y < p.y || y == p.y && x < p.x; }
} p[2][maxn];
long long solve(int n, P p[maxn]) {
  long long res = 0, l, r;
  multiset<int> s, t;
  for (int i = (1); i <= (n); i++) p[i].x /= 2, p[i].y /= 2;
  sort(p + 1, p + n + 1);
  for (int i = (1); i <= (n); i++) s.insert(p[i].x);
  for (int i = (1); i <= (n - 1); i++) {
    s.erase(s.find(p[i].x));
    t.insert(p[i].x);
    if (p[i].y == p[i + 1].y) continue;
    l = max(*s.begin(), *t.begin());
    r = min(*(--s.end()), *(--t.end()));
    res += (p[i + 1].y - p[i].y) * max(0LL, r - l);
  }
  return res;
}
int main() {
  int n, x, y, m[2] = {0, 0};
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) {
    scanf("%d%d", &x, &y);
    if ((x & 1) == (y & 1)) {
      p[0][++m[0]].x = 2 * maxn + x + y;
      p[0][m[0]].y = 2 * maxn + x - y;
    } else {
      p[1][++m[1]].x = 2 * maxn + x + y;
      p[1][m[1]].y = 2 * maxn + x - y;
    }
  }
  cout << solve(m[0], p[0]) + solve(m[1], p[1]);
  return 0;
}
