#include <bits/stdc++.h>
using namespace std;
int N;
pair<int, int> P[100005];
long long ans;
pair<int, int> X[100005];
int Max[100005], Min[100005], Max2[100005], Min2[100005];
int cnt;
void Read() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    P[i] = make_pair(x, y);
  }
}
inline int mod(int x) { return max(x, -x); }
void fillX() {
  cnt = 0;
  for (int i = 1; i <= N; i++) {
    int x = P[i].first, y = P[i].second;
    if ((mod(x + y)) % 2 == 1) X[++cnt] = make_pair(x + y, x - y);
  }
  sort(X + 1, X + cnt + 1);
  for (int i = 1; i <= cnt; i++) {
    if (i != 1) {
      Max[i] = max(Max[i - 1], X[i].second);
      Min[i] = min(Min[i - 1], X[i].second);
    } else {
      Max[i] = X[i].second;
      Min[i] = X[i].second;
    }
  }
  for (int i = cnt; i >= 1; i--) {
    if (i != cnt) {
      Max2[i] = max(Max2[i + 1], X[i].second);
      Min2[i] = min(Min2[i + 1], X[i].second);
    } else {
      Max2[i] = X[i].second;
      Min2[i] = X[i].second;
    }
  }
}
void Solve() {
  int down = X[1].second, up = down;
  for (int i = 1; i < cnt; i++) {
    int diff = X[i + 1].first - X[i].first;
    int d = max(Min[i], Min2[i + 1]);
    int u = min(Max[i], Max2[i + 1]);
    if (u <= d || diff == 0) continue;
    int h = (diff - 1) / 2 + 1;
    int w = (u - d - 1) / 2 + 1;
    ans += (1LL * h * w);
  }
}
void getAns() {
  fillX();
  Solve();
  for (int i = 1; i <= N; i++) P[i].first++;
  fillX();
  Solve();
  cout << ans << "\n";
}
int main() {
  Read();
  getAns();
  return 0;
}
