#include <bits/stdc++.h>
using namespace std;
const int N = 1000000 + 10;
const int MAX_INF = 200000;
const int MIN_INF = -200000;
long long Solve(vector<pair<int, int>> &pv) {
  long long res = 0;
  sort(pv.begin(), pv.end());
  multiset<int> st[2];
  for (auto p : pv) {
    st[1].insert(p.second);
  }
  int _p = 0;
  for (int _x = MIN_INF; _x <= MAX_INF; _x++) {
    vector<int> vec;
    while (_p < (int)pv.size() && pv[_p].first == _x) {
      vec.push_back(pv[_p].second);
      st[1].erase(st[1].find(pv[_p].second));
      _p++;
    }
    if (!st[0].empty() && !st[1].empty() && _x % 2 == 0) {
      int L = max(*st[0].begin(), *st[1].begin());
      int R = min(*st[0].rbegin(), *st[1].rbegin());
      L++;
      R--;
      if (L <= R) {
        int len = max(R - L + 1, 0);
        res += len / 2 + 1;
      }
    }
    for (auto _y : vec) st[0].insert(_y);
  }
  return res;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<pair<int, int>> p[2];
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    if ((x + y) & 1) {
      p[0].push_back(make_pair(y + x, y - x));
    } else {
      x++;
      p[1].push_back(make_pair(y + x, y - x));
    }
  }
  long long ans = Solve(p[0]) + Solve(p[1]);
  printf("%lld\n", ans);
  return 0;
}
