#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a == c)
    cout << a + 2 + 2 * (b + d) + c + 2;
  else
    cout << a + 2 + 2 * (b + d) + c + 2 + 1 + a - c - 1;
  return 0;
}
