#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  Point() {
    x = 0;
    y = 0;
  }
  Point(long long X, long long Y) {
    x = X;
    y = Y;
  }
  long long len2() const { return x * x + y * y; }
};
Point operator+(Point a, Point b) { return Point(a.x + b.x, a.y + b.y); }
Point operator-(Point a, Point b) { return Point(a.x - b.x, a.y - b.y); }
Point operator*(Point p, long long a) { return Point(p.x * a, p.y * a); }
Point operator*(long long a, Point p) { return p * a; }
Point operator/(Point p, long long a) { return Point(p.x / a, p.y / a); }
long long dist2(Point a, Point b) { return (a - b).len2(); }
long long operator*(Point a, Point b) { return a.x * b.y - a.y * b.x; }
long long operator%(Point a, Point b) { return a.x * b.x + a.y * b.y; }
long long FindAngle(Point a, Point b) { return atan2(a * b, a % b); }
bool comp(Point a, Point b) {
  return (a * b > 0 || (a * b == 0 && a.len2() <= b.len2()));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, sz(0), best(0), cnt(0);
  cin >> n;
  Point p[5 * n];
  set<pair<int, int> > is;
  for (int i(0); i < n; ++i) {
    cin >> p[cnt].x >> p[cnt].y;
    if (is.count(make_pair(p[cnt].x, p[cnt].y))) continue;
    is.insert(make_pair(p[cnt].x, p[cnt].y));
    ++cnt;
  }
  for (int i(0); i < cnt; ++i) {
    if (!is.count(make_pair(p[i].x - 1, p[i].y))) {
      p[cnt + sz++] = Point(p[i].x - 1, p[i].y);
      is.insert(make_pair(p[i].x - 1, p[i].y));
    }
    if (!is.count(make_pair(p[i].x + 1, p[i].y))) {
      p[cnt + sz++] = Point(p[i].x + 1, p[i].y);
      is.insert(make_pair(p[i].x + 1, p[i].y));
    }
    if (!is.count(make_pair(p[i].x, p[i].y - 1))) {
      p[cnt + sz++] = Point(p[i].x, p[i].y - 1);
      is.insert(make_pair(p[i].x, p[i].y - 1));
    }
    if (!is.count(make_pair(p[i].x, p[i].y + 1))) {
      p[cnt + sz++] = Point(p[i].x, p[i].y + 1);
      is.insert(make_pair(p[i].x, p[i].y + 1));
    }
  }
  n = cnt + sz;
  for (int i(1); i < n; ++i) {
    if (p[i].y == p[best].y) {
      if (p[i].x <= p[best].x) best = i;
    } else if (p[i].y < p[best].y)
      best = i;
  }
  Point stack[n + 5], tmp[n + 5];
  int sz1(0);
  for (int i(0); i < n; ++i)
    if (i != best) tmp[sz1++] = p[i] - p[best];
  sort(tmp, tmp + sz1, comp);
  sz1 = 0;
  stack[sz1++] = p[best];
  int i(0);
  while (i < n - 1) {
    while ((tmp[i] + p[best] - stack[sz1 - 1]) *
                   (stack[sz1 - 2] - stack[sz1 - 1]) <=
               0 &&
           sz1 > 1)
      sz1--;
    stack[sz1++] = tmp[i++] + p[best];
  }
  long long ans(0LL);
  for (i = 1; i < sz1; ++i) {
    ans += (long long)max(abs(stack[i].x - stack[i - 1].x),
                          abs(stack[i].y - stack[i - 1].y));
  }
  ans += (long long)max(abs(stack[0].x - stack[sz1 - 1].x),
                        abs(stack[0].y - stack[sz1 - 1].y));
  cout << ans;
  return 0;
}
