#include <bits/stdc++.h>
using namespace std;
void getint(int &v) {
  char ch, fu = 0;
  for (ch = '*'; (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
    ;
  if (ch == '-') fu = 1, ch = getchar();
  for (v = 0; ch >= '0' && ch <= '9'; ch = getchar()) v = v * 10 + ch - '0';
  if (fu) v = -v;
}
const int INF = 1e9 + 10;
long long ans;
int n, m, x[500010], y[500010], lmn[500010], lmx[500010], rmn[500010],
    rmx[500010], X[500010], tmp[500010], ts, a[500010], b[500010], Y[500010];
bool ck(int x, int y) { return (x % 2 == 0) ^ (y % 2 == 0); }
int cal(int l, int r, int tp) {
  if (l > r) return 0;
  if ((l % 2 + 2) % 2 != tp) ++l;
  if ((r % 2 + 2) % 2 != tp) --r;
  return (r - l + 2) / 2;
}
void doit(int tp) {
  for (int i = 1; i <= n; ++i)
    a[i] = y[i] + x[i], b[i] = y[i] - x[i], tmp[++ts] = y[i] + x[i],
    tmp[++ts] = y[i] + x[i] + 1;
  sort(tmp + 1, tmp + ts + 1);
  ts = unique(tmp + 1, tmp + ts + 1) - tmp - 1;
  for (int i = 1; i <= ts; ++i) lmn[i] = rmn[i] = INF, lmx[i] = rmx[i] = -INF;
  for (int i = 1; i <= n; ++i) {
    int t = lower_bound(tmp + 1, tmp + ts + 1, a[i]) - tmp;
    lmn[t] = min(lmn[t], b[i]);
    lmx[t] = max(lmx[t], b[i]);
    rmn[t] = min(rmn[t], b[i]);
    rmx[t] = max(rmx[t], b[i]);
  }
  for (int i = 2; i <= ts; ++i)
    lmn[i] = min(lmn[i], lmn[i - 1]), lmx[i] = max(lmx[i], lmx[i - 1]);
  for (int i = ts - 1; i >= 1; --i)
    rmn[i] = min(rmn[i], rmn[i + 1]), rmx[i] = max(rmx[i], rmx[i + 1]);
  for (int i = 1; i <= ts - 1; ++i) {
    int L = tmp[i], R = tmp[i + 1] - 1;
    int s = cal(L, R, tp);
    int l = max(lmn[i], rmn[i]);
    int r = min(lmx[i], rmx[i]);
    ans += 1ll * s * cal(l, r, tp);
  }
}
int main() {
  cin >> m;
  for (int i = 1; i <= m; ++i) getint(X[i]), getint(Y[i]);
  for (int i = 1; i <= m; ++i)
    if (ck(X[i], Y[i]) == 0) x[++n] = X[i], y[n] = Y[i];
  doit(1);
  n = 0;
  for (int i = 1; i <= m; ++i)
    if (ck(X[i], Y[i]) == 1) x[++n] = X[i], y[n] = Y[i];
  doit(0);
  cout << ans << endl;
  return 0;
}
