#include <bits/stdc++.h>
using namespace std;
int main() {
  long long rw, rh, bw, bh, s;
  cin >> rw >> rh >> bw >> bh;
  s = (rw + 2) * (rh + 1) - rw * rh + 2 + (rw - bw) + 2 * bh + bw;
  printf("%d\n", s);
  return 0;
}
