#include <bits/stdc++.h>
using namespace std;
const int N = 400005, T = 200000;
int n, upl[N], upr[N], dnl[N], dnr[N];
vector<pair<int, int>> p[2];
using ll = long long;
ll calc(vector<pair<int, int>> p) {
  memset(upl, 192, sizeof(upl));
  memset(upr, 192, sizeof(upr));
  memset(dnl, 63, sizeof(dnl));
  memset(dnr, 63, sizeof(dnr));
  for (auto &i : p) {
    upl[i.first] = max(upl[i.first], i.second);
    upr[i.first] = max(upr[i.first], i.second);
    dnl[i.first] = min(dnl[i.first], i.second);
    dnr[i.first] = min(dnr[i.first], i.second);
  }
  for (int i = 1; i < N; i++) {
    upl[i] = max(upl[i - 1], upl[i]);
    dnl[i] = min(dnl[i - 1], dnl[i]);
  }
  for (int i = N - 2; i >= 0; --i) {
    upr[i] = max(upr[i + 1], upr[i]);
    dnr[i] = min(dnr[i + 1], dnr[i]);
  }
  ll ret = 0;
  for (int i = 1; i < N; i += 2)
    ret += max(0, (min(upl[i], upr[i]) - max(dnl[i], dnr[i])) / 2);
  return ret;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  int x, y;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    int t = (x + y) & 1;
    p[t].push_back({x + y + T + t, x - y + T + t});
  }
  cout << calc(p[0]) + calc(p[1]) << endl;
  return 0;
}
