#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int a, b, d, c;
  cin >> a >> b >> c >> d;
  a = max(a, c);
  b = b + d;
  cout << (a + 2) * 2 + (b)*2 << endl;
  return 0;
}
