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