#include <bits/stdc++.h>
using namespace std;
const double PI =
    3.141592653589793238462643383279502884197169399375105820974944;
long long dist(long long a, long long b, long long c, long long d) {
  return abs(a - c) + abs(b - d);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long ans = 1000000000;
  for (long long i = c - 1; i <= c + 1; i++) {
    for (long long j = d - 1; j <= d + 1; j++) {
      if (i != c or j != d) {
        ans = min(ans, dist(a, b, i, j));
      }
    }
  }
  cout << 2 * ans + 8 << endl;
}
