#include <bits/stdc++.h>
using namespace std;
int N;
vector<int> G[2][400001];
int leftL[400001], leftR[400001];
int rightL[400001], rightR[400001];
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = 0; i < (N); i++) {
    int x, y;
    cin >> x >> y;
    G[((x + y) % 2 + 2) % 2][(200000 + x + y) / 2].push_back(x - y);
  }
  long long area = 0;
  for (int parity = 0; parity < (2); parity++) {
    int l = 1145141919, r = -1145141919;
    for (int x = 0; x < (400001); x++) {
      for (int y : G[parity][x]) l = min(l, y), r = max(r, y);
      leftL[x] = l, leftR[x] = r;
    }
    l = 1145141919, r = -1145141919;
    for (int x = 400000; x >= 0; x--) {
      rightL[x] = l, rightR[x] = r;
      for (int y : G[parity][x]) l = min(l, y), r = max(r, y);
    }
    for (int x = 0; x < (400001); x++) {
      int l = max(leftL[x], rightL[x]), r = min(leftR[x], rightR[x]);
      if (l > r) continue;
      area += max(0, (r - l + 1) / 2);
    }
  }
  cout << area << "\n";
  return 0;
}
