#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
int N, lo, hi;
int maxY[MAXN * 2], minY[MAXN * 2];
bool vis[MAXN * 2];
inline void add(int x, int y) {
  if (vis[x]) {
    maxY[x] = max(maxY[x], y);
    minY[x] = min(minY[x], y);
  } else {
    vis[x] = true;
    maxY[x] = minY[x] = y;
  }
}
inline int bottom() {
  int lowest = minY[lo];
  for (int i = lo; i <= hi; i++) {
    if (vis[i]) {
      lowest = min(lowest, minY[i]);
    }
  }
  int left = lo, right = hi;
  while (!vis[left] || minY[left] != lowest) {
    left++;
  }
  while (!vis[right] || minY[right] != lowest) {
    right--;
  }
  int ret = (hi - lo);
  int y = lowest;
  for (int i = left - 1; i >= lo; i--) {
    y++;
    if (vis[i]) {
      y = min(y, minY[i]);
    }
  }
  ret += (minY[lo] - y);
  y = lowest;
  for (int i = right + 1; i <= hi; i++) {
    y++;
    if (vis[i]) {
      y = min(y, minY[i]);
    }
  }
  ret += (minY[hi] - y);
  return ret;
}
inline int top() {
  int highest = maxY[lo];
  for (int i = lo; i <= hi; i++) {
    if (vis[i]) {
      highest = max(highest, maxY[i]);
    }
  }
  int left = lo, right = hi;
  while (!vis[left] || maxY[left] != highest) {
    left++;
  }
  while (!vis[right] || maxY[right] != highest) {
    right--;
  }
  int ret = (hi - lo);
  int y = highest;
  for (int i = left - 1; i >= lo; i--) {
    y--;
    if (vis[i]) {
      y = max(y, maxY[i]);
    }
  }
  ret += (y - maxY[lo]);
  y = highest;
  for (int i = right + 1; i <= hi; i++) {
    y--;
    if (vis[i]) {
      y = max(y, maxY[i]);
    }
  }
  ret += (y - maxY[hi]);
  return ret;
}
int main() {
  scanf("%d", &N);
  for (int a, b, i = 0; i < N; i++) {
    scanf("%d %d", &a, &b);
    a += MAXN;
    b += MAXN;
    add(a - 1, b);
    add(a + 1, b);
    add(a, b - 1);
    add(a, b + 1);
  }
  lo = 0;
  hi = 2 * MAXN - 1;
  while (!vis[lo]) {
    lo++;
  }
  while (!vis[hi]) {
    hi--;
  }
  int ans = (maxY[lo] - minY[lo]) + (maxY[hi] - minY[hi]) + bottom() + top();
  printf("%d\n", ans);
  return 0;
}
