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