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