#include <bits/stdc++.h>
using namespace std;
int n;
int sx = 0, sy = 0;
vector<int> v[400000 + 10];
int get(int x, int a, int b) {
  if ((x % 2) == sx) return 0;
  int l = b - a + 1;
  if (l <= 0) return 0;
  if ((a % 2) == sy)
    return l / 2;
  else
    return (l + 1) / 2;
}
void reset() {
  for (int i = 0; i <= 400000; i++) v[i].clear();
}
void addpoint(int x, int y) { v[x].push_back(y); }
int lmax[400000 + 10], lmin[400000 + 10], rmax[400000 + 10], rmin[400000 + 10];
long long solve() {
  for (int i = 0; i <= 400000; i++) {
    sort((v[i]).begin(), (v[i]).end());
    lmax[i] = rmax[i] = -1;
    lmin[i] = rmin[i] = 400000 + 1;
  }
  for (int i = 0; i <= 400000; i++) {
    if (!v[i].empty()) {
      lmax[i] = max(lmax[i], v[i].back());
      lmin[i] = min(lmin[i], v[i][0]);
    }
    if (i) {
      lmax[i] = max(lmax[i], lmax[i - 1]);
      lmin[i] = min(lmin[i], lmin[i - 1]);
    }
  }
  for (int i = 400000; i >= 0; i--) {
    if (!v[i].empty()) {
      rmax[i] = max(rmax[i], v[i].back());
      rmin[i] = min(rmin[i], v[i][0]);
    }
    if (i < 400000) {
      rmax[i] = max(rmax[i], rmax[i + 1]);
      rmin[i] = min(rmin[i], rmin[i + 1]);
    }
  }
  long long ans = 0ll;
  for (int i = 1; i < 400000; i++) {
    if (rmax[i + 1] == -1 || lmax[i - 1] == -1) continue;
    int up = min(lmax[i - 1], rmax[i + 1]);
    int down = max(lmin[i - 1], rmin[i + 1]);
    if (up <= down) continue;
    ans += (long long)get(i, down + 1, up - 1);
  }
  return ans;
}
int p[100005], q[100005];
int main() {
  scanf("%d", &n);
  int xx, yy;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &xx, &yy);
    p[i] = xx - yy + 200000, q[i] = xx + yy + 200000;
  }
  long long ans = 0ll;
  for (sx = 0; sx < 2; sx++) {
    for (sy = 0; sy < 2; sy++) {
      reset();
      for (int i = 0; i < n; i++) {
        if ((p[i] % 2) == sx && (q[i] % 2) == sy) {
          addpoint(p[i], q[i]);
        }
      }
      ans += solve();
    }
  }
  cout << ans << '\n';
}
