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