#include <bits/stdc++.h>
using namespace std;
const int maxn = 4E5 + 23333;
const int N = 200005;
int n, a, b, lay[maxn], liy[maxn], ray[maxn], riy[maxn];
long long Ans;
vector<pair<int, int> > v1, v2;
void Solve(vector<pair<int, int> > &g) {
  int Min = maxn, Max = -maxn, flag = 0;
  for (int i = 0; i < maxn; i++)
    lay[i] = ray[i] = -maxn, liy[i] = riy[i] = maxn;
  for (int i = 0; i < g.size(); i++) {
    g[i].first += N;
    Min = ((Min) < (g[i].first) ? (Min) : (g[i].first));
    Max = ((Max) > (g[i].first) ? (Max) : (g[i].first));
    lay[g[i].first] =
        ((lay[g[i].first]) > (g[i].second) ? (lay[g[i].first]) : (g[i].second));
    ray[g[i].first] =
        ((ray[g[i].first]) > (g[i].second) ? (ray[g[i].first]) : (g[i].second));
    liy[g[i].first] =
        ((liy[g[i].first]) < (g[i].second) ? (liy[g[i].first]) : (g[i].second));
    riy[g[i].first] =
        ((riy[g[i].first]) < (g[i].second) ? (riy[g[i].first]) : (g[i].second));
  }
  for (int i = Min; i <= Max; i++)
    lay[i] = ((lay[i]) > (lay[i - 1]) ? (lay[i]) : (lay[i - 1])),
    liy[i] = ((liy[i]) < (liy[i - 1]) ? (liy[i]) : (liy[i - 1]));
  for (int i = Max; i >= Min; i--)
    ray[i] = ((ray[i]) > (ray[i + 1]) ? (ray[i]) : (ray[i + 1])),
    riy[i] = ((riy[i]) < (riy[i + 1]) ? (riy[i]) : (riy[i + 1]));
  for (int i = Min + 1; i <= Max; i += 2) {
    if (lay[i - 1] == liy[i - 1]) continue;
    if (ray[i + 1] == riy[i + 1]) continue;
    int up = ((lay[i - 1]) < (ray[i + 1]) ? (lay[i - 1]) : (ray[i + 1]));
    int down = ((liy[i - 1]) > (riy[i + 1]) ? (liy[i - 1]) : (riy[i + 1]));
    if (up > down) Ans += 1LL * (up - down) / 2LL;
  }
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if ((x + y) % 2 == 0)
      v1.push_back((make_pair((x - y), (x + y))));
    else
      ++y, v2.push_back((make_pair((x - y), (x + y))));
  }
  Solve(v1);
  Solve(v2);
  cout << Ans << endl;
  return 0;
}
