#include <bits/stdc++.h>
using namespace std;
int n, mx[100100 * 4], mn[100100 * 4];
long long ans;
struct token {
  int x, y;
} d[100100];
bool cmp(token a, token b) { return a.x < b.x; }
int main() {
  scanf("%d", &n);
  for (int i = 1, E = n; i <= E; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    d[i] = (token){x + y, x - y};
  }
  sort(d + 1, d + n + 1, cmp);
  int l[2], r[2], a = 1;
  l[0] = l[1] = 200000 * 2 + 2, r[0] = r[1] = -200000 * 2 - 2;
  for (int i = 0, E = 200000 * 2; i <= E; i++) mx[i] = l[0], mn[i] = r[0];
  for (int i = -200000, E = 200000; i <= E; i++) {
    int w = (i % 2 + 2) & 1;
    mn[i + 200000] = max(mn[i + 200000], l[1 ^ w]);
    mx[i + 200000] = min(mx[i + 200000], r[1 ^ w]);
    for (; a <= n && d[a].x == i; ++a) {
      l[w] = min(l[w], d[a].y);
      r[w] = max(r[w], d[a].y);
    }
  }
  l[0] = l[1] = 200000 * 2 + 2, r[0] = r[1] = -200000 * 2 - 2;
  a = n;
  for (int i = 200000, E = -200000; i >= E; i--) {
    int w = (i % 2 + 2) & 1;
    mn[i + 200000] = max(mn[i + 200000], l[1 ^ w]);
    mx[i + 200000] = min(mx[i + 200000], r[1 ^ w]);
    for (; a && d[a].x == i; --a) {
      l[w] = min(l[w], d[a].y);
      r[w] = max(r[w], d[a].y);
    }
  }
  for (int i = -200000, E = 200000; i <= E; i++) {
    int w = (i % 2 + 2) & 1;
    if ((mn[i + 200000] % 2 + 2) % 2 != w) ++mn[i + 200000];
    if ((mx[i + 200000] % 2 + 2) % 2 != w) --mx[i + 200000];
    if (mx[i + 200000] >= mn[i + 200000])
      ans += (mx[i + 200000] - mn[i + 200000]) / 2 + 1;
  }
  printf("%I64d", ans);
  return 0;
}
