#include <bits/stdc++.h>
using namespace std;
template <typename Tp>
inline void read(Tp &x) {
  static char c;
  static bool neg;
  x = 0, c = getchar(), neg = false;
  for (; !isdigit(c); c = getchar()) {
    if (c == '-') {
      neg = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (neg) {
    x = -x;
  }
}
const int MX = 1e5 + 2;
const int ADD = MX * 2;
const int N = ADD * 2;
const int SET = 0x3f;
int n;
vector<pair<int, int> > vec[2];
long long ans;
int upL[N], upR[N], downL[N], downR[N];
template <typename Tp>
inline void checkMax(Tp &x, const Tp &y) {
  if (x < y) {
    x = y;
  }
}
template <typename Tp>
inline void checkMin(Tp &x, const Tp &y) {
  if (x > y) {
    x = y;
  }
}
inline void work(const vector<pair<int, int> > &points) {
  memset(upL, -SET, sizeof(upL));
  memset(downL, SET, sizeof(downL));
  for (const auto &p : points) {
    checkMax(upL[p.first], p.second);
    checkMin(downL[p.first], p.second);
  }
  memcpy(upR, upL, sizeof(upL));
  memcpy(downR, downL, sizeof(downL));
  for (int i = 1; i < N; ++i) {
    checkMax(upL[i], upL[i - 1]);
    checkMin(downL[i], downL[i - 1]);
  }
  for (int i = N - 2; i >= 0; --i) {
    checkMax(upR[i], upR[i + 1]);
    checkMin(downR[i], downR[i + 1]);
  }
  for (int i = 1, up, down; i < N; i += 2) {
    up = std::min(upL[i], upR[i]);
    down = std::max(downL[i], downR[i]);
    if (up > down) {
      ans += (up - down) / 2;
    }
  }
}
int main() {
  read(n);
  vec[0].reserve(n);
  vec[1].reserve(n);
  for (int i = 1, x, y, b; i <= n; ++i) {
    read(x), read(y);
    b = (x + y + ADD) % 2;
    vec[b].emplace_back((pair<int, int>){x + y + ADD + b, x - y + ADD + b});
  }
  work(vec[0]);
  work(vec[1]);
  std::printf("%lld\n", ans);
}
