#include <bits/stdc++.h>
#pragma comment(linker, "/stack:640000000")
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = acos(-1.0);
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int t, n, m;
int main() {
  pair<int, int> frst, scnd;
  while (~scanf("%d%d", &frst.first, &frst.second)) {
    scanf("%d%d", &scnd.first, &scnd.second);
    int ans = 0;
    if (frst.first == scnd.first) {
      int mn = min(frst.second, scnd.second);
      int mx = max(frst.second, scnd.second);
      mx++;
      ans = abs(mx - mn);
      ans *= 2;
      ans += 4;
    } else if (frst.second == scnd.second) {
      int mn = min(frst.first, scnd.first);
      int mx = max(frst.first, scnd.first);
      mx++;
      ans = abs(mx - mn);
      ans *= 2;
      ans += 4;
    } else {
      ans = INF;
      if (frst.first > scnd.first) swap(frst, scnd);
      int res = 0;
      res += abs(scnd.first + 1 - frst.first);
      res += abs(scnd.second - frst.second);
      res *= 2;
      res += 2;
      ans = min(ans, res);
      if (frst.second > scnd.second) swap(frst, scnd);
      res = 0;
      res += abs(scnd.second + 1 - frst.second);
      res += abs(scnd.first - frst.first);
      res *= 2;
      res += 2;
      ans = min(ans, res);
    }
    printf("%d\n", ans);
  }
  return 0;
}
