#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
const long long ooo = 9223372036854775807ll;
const int _cnt = 1000 * 1000 + 7;
const int _p = 1000 * 1000 * 1000 + 7;
const int N = 300005;
const double PI = acos(-1.0);
const double eps = 1e-9;
int o(int x) { return x % _p; }
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
void file_put() {
  freopen("filename.in", "r", stdin);
  freopen("filename.out", "w", stdout);
}
struct ttype {
  int x, y;
};
int M = 150000, n, x, y, l[N], r[N], LU[N], LD[N], RU[N], RD[N], t, B;
vector<ttype> V[2];
long long ans = 0;
int get_len(int p, int q) {
  int L = ((l[p]) > (l[q]) ? (l[p]) : (l[q])),
      R = ((r[p]) < (r[q]) ? (r[p]) : (r[q]));
  return L > R ? 0 : R - L;
}
void work(int k) {
  if (V[k].empty()) return;
  for (int i = (0); i <= (300000); ++i) l[i] = oo, r[i] = -oo;
  B = -oo;
  for (__typeof((V[k]).begin()) it = (V[k]).begin(); it != (V[k]).end(); it++)
    l[it->y] = ((l[it->y]) < (it->x) ? (l[it->y]) : (it->x)),
    r[it->y] = ((r[it->y]) > (it->x) ? (r[it->y]) : (it->x)),
    B = ((B) > (it->y) ? (B) : (it->y));
  LD[0] = oo;
  for (int i = (1); i <= (B); ++i)
    LD[i] = ((LD[i - 1]) < (l[i]) ? (LD[i - 1]) : (l[i]));
  LU[B] = l[B];
  for (int i = (B - 1); i >= (1); --i)
    LU[i] = ((LU[i + 1]) < (l[i]) ? (LU[i + 1]) : (l[i]));
  RD[0] = -oo;
  for (int i = (1); i <= (B); ++i)
    RD[i] = ((RD[i - 1]) > (r[i]) ? (RD[i - 1]) : (r[i]));
  RU[B] = r[B];
  for (int i = (B - 1); i >= (1); --i)
    RU[i] = ((RU[i + 1]) > (r[i]) ? (RU[i + 1]) : (r[i]));
  for (int i = (1); i <= (B); ++i)
    l[i] = ((LU[i]) > (LD[i]) ? (LU[i]) : (LD[i])),
    r[i] = ((RU[i]) < (RD[i]) ? (RU[i]) : (RD[i]));
  for (int i = (2); i <= (B); ++i) ans += get_len(i - 1, i);
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) {
    scanf("%d%d", &x, &y), t = abs(x + y) % 2;
    V[t].push_back(ttype{(x - t + y) / 2 + M, (y - x + t) / 2 + M});
  }
  work(0), work(1);
  printf("%I64d\n", ans);
  return 0;
}
