#include <bits/stdc++.h>
using namespace std;
long long x[1000000];
int main() {
  long long w1, h1, w2, h2, h, w, res;
  cin >> w1 >> h1 >> w2 >> h2;
  h = 2 * (h1 + h2) + 4;
  w = w1 + w2 + abs(w1 - w2);
  res = (h + w);
  cout << res << endl;
}
