#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;
  long long ans = 0;
  if (x1 == x2) {
    ans = 2 * x1 + (y1 + y2) * 2 + 4;
  } else {
    ans = x2 + x1 + (y1 + y2) * 2 + 4 + abs(x1 - x2);
  }
  cout << ans;
}
