#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long w1, h1, w2, h2, s;
  cin >> w1 >> h1 >> w2 >> h2;
  s = ((w1 + w2) + ((h1 + h2) * 2)) + 4 + (w1 - w2);
  cout << s;
  return 0;
}
