#include <bits/stdc++.h>
using namespace std;
long long solve(vector<pair<long long, long long> > p) {
  map<long long, long long> left;
  map<long long, long long> right;
  sort(p.begin(), p.end());
  for (int i = 0; i < p.size(); i++) {
    right[p[i].second]++;
  }
  long long ans = 0;
  for (int i = 0; i < p.size(); i++) {
    left[p[i].second]++;
    right[p[i].second]--;
    if (right[p[i].second] == 0) right.erase(p[i].second);
    if (!right.empty() && p[i].first != p[i + 1].first) {
      long long hi = min((--left.end())->first, (--right.end())->first);
      long long lo = max((left.begin())->first, (right.begin())->first);
      if (hi > lo) ans += (hi - lo) * (p[i + 1].first - p[i].first);
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long> > p1;
  vector<pair<long long, long long> > p2;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (((x + y) % 2 + 2) % 2 == 1)
      p1.push_back({(x + y + 1) / 2, (x - y + 1) / 2});
    else
      p2.push_back({(x + y) / 2, (x - y) / 2});
  }
  cout << solve(p1) + solve(p2) << endl;
  ;
  return 0;
}
