#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 400010;
const int C = 200002;
int n, dmn[maxn], dmx[maxn], umn[maxn], umx[maxn];
vector<int> v[2][maxn];
inline long long solve(int x, int t) {
  umn[0] = dmn[maxn - 1] = inf, umx[0] = dmx[maxn - 1] = -inf;
  for (int i = 1; i < maxn; ++i) {
    umn[i] = umn[i - 1];
    umx[i] = umx[i - 1];
    for (int j = 0; j < (int)v[x][i].size(); ++j) {
      umn[i] = min(umn[i], v[x][i][j]);
      umx[i] = max(umx[i], v[x][i][j]);
    }
  }
  for (int i = maxn - 2; i >= 1; --i) {
    dmn[i] = dmn[i + 1];
    dmx[i] = dmx[i + 1];
    for (int j = 0; j < (int)v[x][i].size(); ++j) {
      dmn[i] = min(dmn[i], v[x][i][j]);
      dmx[i] = max(dmx[i], v[x][i][j]);
    }
  }
  long long ret = 0;
  for (int i = 1; i < maxn - 1; ++i)
    if ((i & 1) ^ t)
      ret += max(
          0, (min(umx[i - 1], dmx[i + 1]) - max(umn[i - 1], dmn[i + 1])) / 2);
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[(x + y) & 1][x + y + C].push_back(x - y);
  }
  return cout << solve(0, 0) + solve(1, 1) << endl, 0;
}
