#include <bits/stdc++.h>
using namespace std;
const int MINV = -200000;
const int MAXV = 200001;
const int INF = 1e9;
int left_lo[2 * (MAXV - MINV + 1)], right_lo[2 * (MAXV - MINV + 1)];
int left_hi[2 * (MAXV - MINV + 1)], right_hi[2 * (MAXV - MINV + 1)];
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int> > p[2];
  for (int i = 0; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x -= MINV;
    y -= MINV;
    if ((x + y) % 2 == 0)
      p[0].push_back(make_pair(x, y));
    else
      p[1].push_back(make_pair(x + 1, y));
  }
  long long res = 0;
  for (int i = 0; i < 2; i++) {
    if (p[i].empty()) continue;
    for (int& j : left_lo) j = INF;
    for (int& j : right_lo) j = INF;
    for (int& j : left_hi) j = -INF;
    for (int& j : right_hi) j = -INF;
    vector<vector<pair<int, int> > > pxy;
    int minxy = INF, maxxy = -INF;
    for (pair<int, int>& pnt : p[i]) {
      minxy = min(minxy, pnt.first + pnt.second);
      maxxy = max(maxxy, pnt.first + pnt.second);
    }
    pxy.resize(maxxy + 1);
    for (pair<int, int>& pnt : p[i]) pxy[pnt.first + pnt.second].push_back(pnt);
    for (int j = minxy; j <= maxxy; j++) {
      if (j) {
        left_lo[j] = left_lo[j - 1];
        left_hi[j] = left_hi[j - 1];
      }
      for (pair<int, int>& pnt : pxy[j]) {
        left_lo[j] = min(left_lo[j], pnt.first - pnt.second);
        left_hi[j] = max(left_hi[j], pnt.first - pnt.second);
      }
    }
    for (int j = maxxy; j >= minxy; j--) {
      if (j + 1 <= maxxy) {
        right_lo[j] = right_lo[j + 1];
        right_hi[j] = right_hi[j + 1];
      }
      for (pair<int, int>& pnt : pxy[j]) {
        right_lo[j] = min(right_lo[j], pnt.first - pnt.second);
        right_hi[j] = max(right_hi[j], pnt.first - pnt.second);
      }
    }
    for (int j = minxy; j <= maxxy; j++) {
      if (j % 2 == 1) {
        int lo = max(left_lo[j], right_lo[j]);
        int hi = min(left_hi[j], right_hi[j]);
        if (lo < hi) res += (hi - lo) / 2;
      }
    }
  }
  printf("%lld\n", res);
  return 0;
}
