#include <bits/stdc++.h>
using namespace std;
template <typename T>
using min_queue = priority_queue<T, vector<T>, greater<T> >;
const long long MOD = 1e9 + 7;
const int MAX = 200010;
int N;
vector<pair<int, int> > pt[2];
int l[2][MAX * 2 + 10];
int r[2][MAX * 2 + 10];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> N;
  for (int i = 0; i < N; i++) {
    int x, y;
    cin >> x >> y;
    if ((x + y) % 2)
      pt[0].push_back({x + y, x - y});
    else
      pt[1].push_back({x + y - 1, x - y - 1});
  }
  sort(pt[0].begin(), pt[0].end());
  sort(pt[1].begin(), pt[1].end());
  long long res = 0;
  for (int ix = 0; ix < 2; ix++) {
    int mn = 1e9, mx = -1e9;
    int i = 0;
    for (int s = -MAX; s <= MAX; s += 2) {
      while (i < pt[ix].size() && pt[ix][i].first < s) {
        mn = min(mn, pt[ix][i].second);
        mx = max(mx, pt[ix][i].second);
        i++;
      }
      l[ix][s + MAX] = mn;
      r[ix][s + MAX] = mx;
    }
    mn = 1e9, mx = -1e9;
    i = pt[ix].size() - 1;
    for (int s = MAX; s >= -MAX; s -= 2) {
      while (i >= 0 && pt[ix][i].first > s) {
        mn = min(mn, pt[ix][i].second);
        mx = max(mx, pt[ix][i].second);
        i--;
      }
      l[ix][s + MAX] = max(mn, l[ix][s + MAX]);
      r[ix][s + MAX] = min(mx, r[ix][s + MAX]);
      if (l[ix][s + MAX] < r[ix][s + MAX]) {
        res += (r[ix][s + MAX] - l[ix][s + MAX]) / 2;
      }
    }
  }
  cout << res << '\n';
  return 0;
}
