#include <bits/stdc++.h>
using namespace std;
int rw, rh, bw, bh;
int main() {
  cin >> rw >> rh >> bw >> bh;
  int Cred = rh * 2 + rw + 2, Cblue = bh * 2 + bw + 2;
  int n = Cblue + Cred;
  if (bw > rw)
    n += bw - rw;
  else
    n += rw - bw;
  cout << n << endl;
  return 0;
}
