#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 1e9 + 1e6;
const int MOD = 1e9 + 9;
template <typename T>
void maximize(T& x, const T& y) {
  if (y > x) x = y;
}
template <typename T>
void minimize(T& x, const T& y) {
  if (y < x) x = y;
}
const int N = 1e5 + 5;
int n;
ll ans = 0;
pii points[N];
void solve(int bit) {
  vector<pii> new_points;
  for (int i = 0; i < (int)(n); ++i)
    if (((points[i].first - points[i].second) % 2 + 2) % 2 == bit) {
      int x = points[i].first, y = points[i].second;
      pii point(x + y, x - y);
      new_points.push_back(point);
    }
  if (new_points.empty()) return;
  sort((new_points).begin(), (new_points).end());
  int min_x = INF, max_x = -INF;
  for (pii p : new_points) {
    minimize(min_x, p.first);
    maximize(max_x, p.first);
  }
  int len = max_x - min_x + 1;
  vector<int> low_left, high_left, low_right, high_right;
  low_left = high_left = low_right = high_right = vector<int>(len);
  int low, high, iter;
  low = INF;
  high = -INF;
  iter = 0;
  for (int i = 0; i < (int)(len); ++i) {
    int x = min_x + i;
    while (iter < ((int)new_points.size()) && new_points[iter].first < x) {
      minimize(low, new_points[iter].second);
      maximize(high, new_points[iter].second);
      ++iter;
    }
    low_left[i] = low;
    high_left[i] = high;
  }
  low = INF;
  high = -INF;
  iter = ((int)new_points.size()) - 1;
  for (int i = (int)(len)-1; i >= 0; --i) {
    int x = min_x + i;
    while (iter >= 0 && new_points[iter].first > x) {
      minimize(low, new_points[iter].second);
      maximize(high, new_points[iter].second);
      --iter;
    }
    low_right[i] = low;
    high_right[i] = high;
  }
  for (int i = 0; i < (int)(len); ++i)
    if (i % 2 != 0) {
      int low = max(low_left[i], low_right[i]);
      int high = min(high_left[i], high_right[i]);
      if (low < high) ans += (high - low) / 2;
    }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) cin >> points[i].first >> points[i].second;
  solve(0);
  solve(1);
  cout << ans << endl;
  return 0;
}
