#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
};
bool cmp(point a, point b) { return a.x < b.x; }
int a[100010], b[100010], dl1[100010], dl2[100010], n;
long long ans;
point p[100010];
void solve() {
  int tot = 0;
  for (int i = 1; i <= n; i++)
    if ((a[i] + b[i]) % 2) p[++tot] = (point){a[i] + b[i], a[i] - b[i]};
  sort(p + 1, p + tot + 1, cmp);
  int lef1 = 1, righ1 = 0, lef2 = 1, righ2 = 0;
  for (int i = 1; i <= tot; i++) {
    while (lef1 <= righ1 && p[dl1[righ1]].y >= p[i].y) righ1--;
    dl1[++righ1] = i;
  }
  for (int i = 1; i <= tot; i++) {
    while (lef2 <= righ2 && p[dl2[righ2]].y <= p[i].y) righ2--;
    dl2[++righ2] = i;
  }
  int mx = p[1].y, mn = p[1].y;
  for (int i = 2; i <= tot; i++) {
    while (lef1 <= righ1 && p[dl1[lef1]].x < p[i].x) lef1++;
    while (lef2 <= righ2 && p[dl2[lef2]].x < p[i].x) lef2++;
    if (lef1 > righ1 || lef2 > righ2) break;
    int up = min(mx, p[dl2[lef2]].y), down = max(mn, p[dl1[lef1]].y);
    if (up >= down)
      ans += ((long long)up - down) / 2 * (p[i].x - p[i - 1].x) / 2;
    mn = min(mn, p[i].y);
    mx = max(mx, p[i].y);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d%d", &a[i], &b[i]);
  solve();
  for (int i = 1; i <= n; i++) b[i]++;
  solve();
  printf("%I64d\n", ans);
  return 0;
}
