#include <bits/stdc++.h>
using namespace std;
int n;
int xo[100005], yo[100005];
int dy[] = {-1, 0, 1, 0};
int dx[] = {0, -1, 0, 1};
vector<pair<int, int> > f[2][4];
long long ans = 0;
int par(int v) { return abs(v) % 2; }
void add(int x0, int x1, int y0, int y1, int p) {
  if (par(x0) != p) x0++;
  if (par(x1) != p) x1--;
  if (par(y0) != p) y0++;
  if (par(y1) != p) y1--;
  int w = x0 <= x1 ? (x1 - x0 + 2) / 2 : 0;
  int h = y0 <= y1 ? (y1 - y0 + 2) / 2 : 0;
  ans += w * 1ll * h;
}
int main() {
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) {
    scanf("%d %d", xo + i, yo + i);
    for (int j = (0); j < (4); j++) {
      int nx = xo[i] + dx[j];
      int ny = yo[i] + dy[j];
      int p = par(nx + ny);
      f[p][j].emplace_back(nx - ny, nx + ny);
    }
  }
  for (int p = (0); p < (2); p++) {
    vector<int> xs;
    for (int j = (0); j < (4); j++) {
      for (auto pt : f[p][j]) {
        xs.push_back(pt.first);
      }
    }
    sort(xs.begin(), xs.end());
    xs.resize(unique(xs.begin(), xs.end()) - xs.begin());
    vector<int> bf[4];
    for (int j = (0); j < (4); j++) bf[j].resize(int(xs.size()));
    for (int j = (0); j < (4); j++)
      for (int i = (0); i < (int(xs.size())); i++) {
        bf[j][i] = j < 2 ? -2e9 : 2e9;
      }
    for (int j = (0); j < (4); j++)
      for (auto pt : f[p][j]) {
        int x = pt.first, y = pt.second;
        int xi = lower_bound(xs.begin(), xs.end(), x) - xs.begin();
        if (j < 2)
          bf[j][xi] = max(bf[j][xi], y);
        else
          bf[j][xi] = min(bf[j][xi], y);
      }
    for (int i = (1); i < (int(xs.size())); i++) {
      bf[0][i] = max(bf[0][i], bf[0][i - 1]);
      bf[3][i] = min(bf[3][i], bf[3][i - 1]);
    }
    for (int i = int(xs.size()) - 2; i >= 0; i--) {
      bf[1][i] = max(bf[1][i], bf[1][i + 1]);
      bf[2][i] = min(bf[2][i], bf[2][i + 1]);
    }
    for (int i = (0); i < (int(xs.size())); i++) {
      int mn = max(bf[3][i], bf[2][i]);
      int mx = min(bf[0][i], bf[1][i]);
      add(xs[i], xs[i], mn, mx, p);
      if (i + 1 < int(xs.size()) && xs[i] + 1 != xs[i + 1]) {
        mn = max(bf[3][i], bf[2][i + 1]);
        mx = min(bf[0][i], bf[1][i + 1]);
        add(xs[i] + 1, xs[i + 1] - 1, mn, mx, p);
      }
    }
  }
  printf("%lld\n", ans);
}
