#include <bits/stdc++.h>
using namespace std;
int n;
vector<pair<int, int> > w[400005];
vector<pair<int, int> > p[2];
multiset<int> s0, s1;
long long doit(vector<pair<int, int> >& p) {
  if (!((int)(p).size())) return 0;
  int kk = (p[0].first + p[0].second) % 2;
  for (int i = 0, ThxDem = 400005; i < ThxDem; ++i) w[i].clear();
  for (auto q : p) w[q.first + q.second].push_back(q);
  s0.clear();
  s1.clear();
  for (auto q : p) {
    s1.insert(q.first - q.second);
  }
  long long r = 0;
  for (int i = 0, ThxDem = 400005; i < ThxDem; ++i) {
    if (i % 2 == kk) {
      for (auto q : w[i])
        s1.erase(s1.find(q.first - q.second)), s0.insert(q.first - q.second);
    } else {
      if (!((int)(s0).size()) || !((int)(s1).size())) continue;
      int mn = max(*s0.begin(), *s1.begin()),
          mx = min(*s0.rbegin(), *s1.rbegin());
      if (mn <= mx) r += (mx - mn) / 2;
    }
  }
  return r;
}
int main() {
  scanf("%d", &n);
  for (int i = 0, ThxDem = n; i < ThxDem; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    x += 100000;
    y += 100000;
    p[(x + y) % 2].push_back(make_pair(x, y));
  }
  printf("%lld\n", doit(p[0]) + doit(p[1]));
  return 0;
}
