#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int w = 1, c = 0;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') w = -1;
  for (; isdigit(ch); ch = getchar()) c = (c << 1) + (c << 3) + (ch ^ 48);
  return w * c;
}
const int inf = 1e9, M = 2e5 + 10;
long long ans;
int mx, a[M], b[M], n, lmx[M], rmx[M], lmi[M], rmi[M];
void work(int o) {
  for (int i = (0); i <= (2 * mx); ++i)
    lmx[i] = rmx[i] = -inf, lmi[i] = rmi[i] = inf;
  for (int i = (1); i <= (n); ++i) {
    int x = a[i] + b[i], y = a[i] - b[i];
    if (o) x++, y++;
    x /= 2;
    y /= 2;
    if (((a[i] + b[i]) & 1) == o) {
      lmx[x + mx] = max(lmx[x + mx], y);
      rmx[x + mx] = max(rmx[x + mx], y);
      lmi[x + mx] = min(lmi[x + mx], y);
      rmi[x + mx] = min(rmi[x + mx], y);
    }
  }
  for (int i = (1); i <= (2 * mx); ++i)
    lmx[i] = max(lmx[i - 1], lmx[i]), lmi[i] = min(lmi[i - 1], lmi[i]);
  for (int i = (2 * mx - 1); i >= (0); --i)
    rmx[i] = max(rmx[i + 1], rmx[i]), rmi[i] = min(rmi[i + 1], rmi[i]);
  for (int i = (0); i <= (2 * mx - 1); ++i) {
    int lb = max(lmi[i], rmi[i + 1]), rb = min(lmx[i], rmx[i + 1]);
    if (lb <= rb) ans += rb - lb;
  }
}
int main() {
  n = read();
  for (int i = (1); i <= (n); ++i) {
    a[i] = read();
    b[i] = read();
    mx = max(mx, abs(a[i]));
    mx = max(mx, abs(b[i]));
  }
  work(0);
  work(1);
  cout << ans << "\n";
  return 0;
}
