#include <bits/stdc++.h>
using namespace std;
int a[200010];
int main() {
  long long w1, w2, h1, h2;
  while (cin >> w1 >> h1 >> w2 >> h2) {
    long long num = 2 * w1 + 2 * h1 + 2 * h2 + 4;
    cout << num << endl;
  }
}
