#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin.exceptions(ios::badbit | ios::failbit);
  int n;
  cin >> n;
  array<vector<pair<int, int>>, 2> a;
  for (auto i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    a[x + y & 1].push_back({x + y, x - y});
  }
  long long res = 0;
  for (auto rem = 0; rem < 2; ++rem) {
    sort(a[rem].begin(), a[rem].end());
    42;
    int n = (int)a[rem].size();
    vector<int> smx(n + 1, numeric_limits<int>::min()),
        smn(n + 1, numeric_limits<int>::max());
    for (auto i = n - 1; i >= 0; --i) {
      smx[i] = max(smx[i + 1], a[rem][i].second);
      smn[i] = min(smn[i + 1], a[rem][i].second);
    }
    int pmx = numeric_limits<int>::min(), pmn = numeric_limits<int>::max();
    for (auto i = 0; i < n - 1; ++i) {
      pmx = max(pmx, a[rem][i].second);
      pmn = min(pmn, a[rem][i].second);
      42;
      if (a[rem][i].first != a[rem][i + 1].first &&
          max(pmn, smn[i + 1]) < min(pmx, smx[i + 1])) {
        res += 1LL * (a[rem][i + 1].first - a[rem][i].first + 1 >> 1) *
               (min(pmx, smx[i + 1]) - max(pmn, smn[i + 1]) + 1 >> 1);
      }
    }
  }
  cout << res << "\n";
  return 0;
}
