#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 8;
int n;
vector<pair<int, int>> odd, even;
int lft[2][2 * N + 5];
int ryt[2][2 * N + 5];
bool fe = 0;
long long go(vector<pair<int, int>> v) {
  for (int val, i = 0; i < 2; i++) {
    if (!i)
      val = 1e9;
    else
      val = -1e9;
    for (int j = 0; j <= 2 * N; j++) lft[i][j] = val, ryt[i][j] = val;
  }
  int j = 0;
  int mn = 1e9, mx = -1e9;
  for (int i = 0; i <= 2 * N; i += 2) {
    while (j < v.size() && v[j].first < i) {
      mn = min(mn, v[j].second);
      mx = max(mx, v[j].second);
      j++;
    }
    lft[0][i] = min(lft[0][i], mn);
    lft[1][i] = max(lft[1][i], mx);
  }
  j = v.size() - 1;
  mn = 1e9, mx = -1e9;
  for (int i = 2 * N; i >= 0; i -= 2) {
    while (j >= 0 && v[j].first > i) {
      mn = min(mn, v[j].second);
      mx = max(mx, v[j].second);
      j--;
    }
    ryt[0][i] = min(ryt[0][i], mn);
    ryt[1][i] = max(ryt[1][i], mx);
  }
  long long ret = 0;
  for (int i = 0; i <= 2 * N; i += 2) {
    int R = min(lft[1][i], ryt[1][i]);
    int L = max(lft[0][i], ryt[0][i]);
    if (L > R) continue;
    ret += (R - L + 1) / 2;
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int a, b, i = 0; i < n; i++) {
    scanf("%d%d", &a, &b);
    if ((a + b + N) & 1)
      odd.push_back({a + b + N, a - b});
    else
      even.push_back({a + N + b + 1, a - b - 1});
  }
  sort(odd.begin(), odd.end());
  sort(even.begin(), even.end());
  long long ans = go(odd);
  ans += go(even);
  cout << ans << endl;
  return 0;
}
