#include <bits/stdc++.h>
using namespace std;
const int N = 1000000;
int n;
int maxx[2 * N + 100], minx[2 * N + 100], maxy[2 * N + 100], miny[2 * N + 100];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  for (int i = 0; i <= 2 * N; i++) {
    maxx[i] = -2e7;
    maxy[i] = -2e7;
    miny[i] = 2e7;
    minx[i] = 2e7;
  }
  cin >> n;
  int uy = -2e7;
  int dy = 2e7;
  int rx = -2e7;
  int lx = 2e7;
  int ux, dx, ry, ly;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    maxx[a + N] = max(maxx[a + N], b);
    minx[a + N] = min(minx[a + N], b);
    maxy[b + N] = max(maxy[b + N], a);
    miny[b + N] = min(miny[b + N], a);
    if (b + 1 > uy) {
      uy = b + 1;
      ux = a;
    }
    if (b - 1 < dy) {
      dy = b - 1;
      dx = a;
    }
    if (a + 1 > rx) {
      rx = a + 1;
      ry = b;
    }
    if (a - 1 < lx) {
      lx = a - 1;
      ly = b;
    }
  }
  int x = lx, y = ly;
  int ans = 0;
  for (int i = rx + N - 1; i > ux + N; i--) {
    maxx[i] = max(maxx[i + 1], maxx[i]);
  }
  for (int i = lx + 1 + N; i <= dx + N; i++) {
    minx[i] = min(minx[i], minx[i - 1]);
  }
  while (x != ux || y != uy) {
    if (y + 1 > maxx[x + 1 + N] && y != uy && x != ux) {
      ans++;
      x++;
      y++;
    } else if (y == uy) {
      ans++;
      x++;
    } else {
      ans++;
      y++;
    }
  }
  while (x != rx || y != ry) {
    if (y - 1 > maxx[x + 1 + N] && y != ry && x != rx) {
      ans++;
      x++;
      y--;
    } else if (x == rx) {
      ans++;
      y--;
    } else {
      ans++;
      x++;
    }
  }
  while (x != dx || y != dy) {
    if (y - 1 < minx[x - 1 + N] && y != dy && x != dx) {
      ans++;
      x--;
      y--;
    } else if (y == dy) {
      x--;
      ans++;
    } else {
      y--;
      ans++;
    }
  }
  while (x != lx || y != ly) {
    if (y + 1 < minx[x - 1 + N] && y != ly && x != lx) {
      ans++;
      x--;
      y++;
    } else if (x == lx) {
      y++;
      ans++;
    } else {
      x--;
      ans++;
    }
  }
  cout << ans;
}
