#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 100;
long long n;
vector<pair<long long, long long>> vec1, vec2;
set<pair<long long, long long>> suf, pre;
long long solve(vector<pair<long long, long long>> vec) {
  if (vec.empty()) return 0;
  sort(vec.begin(), vec.end());
  suf.clear();
  pre.clear();
  long long res = 0;
  for (auto p : vec) pre.insert({p.second, p.first});
  for (long long i = 0; i < vec.size(); i++) {
    long long l = -4 * MAXN, r = -l;
    if (pre.size() && suf.size()) {
      long long l1 = (*(pre.begin())).first;
      long long l2 = (*(suf.begin())).first;
      long long r1 = (*(pre.rbegin())).first;
      long long r2 = (*(suf.rbegin())).first;
      if (l1 <= r2 && l2 <= r1) {
        l = max(l1, l2), r = min(r1, r2);
        res += (r - l) * (vec[i].first - (i > 0 ? vec[i - 1].first : 0));
      }
    }
    pre.erase({vec[i].second, vec[i].first});
    suf.insert({vec[i].second, vec[i].first});
  }
  return res;
}
int32_t main() {
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if ((x + y) % 2)
      vec1.push_back({(x + y + 1) / 2, (x - y + 1) / 2});
    else
      vec2.push_back({(x + y) / 2, (x - y) / 2});
  }
  cout << solve(vec1) + solve(vec2);
}
