#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
const int maxn = (int)2e5 + 10;
pair<int, int> v[maxn];
int n;
pair<int, int> trans(int x, int y) {
  return make_pair((x + y) >> 1, (y - x) >> 1);
}
pair<int, int> g[2][2 * maxn];
long long go() {
  vector<pair<pair<int, int>, int> > a, b;
  for (int i = 0; i < n; i++) {
    if ((v[i].first + v[i].second) & 1) {
      a.push_back(make_pair(trans(v[i].first + 1, v[i].second), 0));
      a.push_back(make_pair(trans(v[i].first, v[i].second + 1), 1));
      b.push_back(make_pair(trans(v[i].first - 1, v[i].second), 1));
      b.push_back(make_pair(trans(v[i].first, v[i].second - 1), 0));
    }
  }
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long ans = 0;
  int l = (int)1e9;
  int r = -(int)1e9;
  int pos = 0;
  for (int i = -maxn; i < maxn; i++) {
    while (pos < (int)a.size() && a[pos].first.first == i) {
      if (a[pos].second == 0) {
        r = max(r, a[pos].first.second);
      } else {
        l = min(l, a[pos].first.second);
      }
      pos++;
    }
    g[0][i + maxn] = make_pair(l, r);
  }
  l = (int)1e9;
  r = -(int)1e9;
  pos = (int)b.size() - 1;
  for (int i = maxn - 1; i >= -maxn; i--) {
    while (pos >= 0 && b[pos].first.first == i) {
      if (b[pos].second == 0) {
        r = max(r, b[pos].first.second);
      } else {
        l = min(l, b[pos].first.second);
      }
      pos--;
    }
    g[1][i + maxn] = make_pair(l, r);
  }
  for (int i = 0; i < 2 * maxn; i++) {
    int l = max(g[0][i].first, g[1][i].first);
    int r = min(g[0][i].second, g[1][i].second);
    if (l <= r) {
      ans += r - l + 1;
    }
  }
  return ans;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &v[i].first, &v[i].second);
  }
  long long ans = go();
  for (int i = 0; i < n; i++) {
    v[i].first++;
  }
  ans += go();
  cout << ans << endl;
}
