#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  n = 0;
  n += 2 * (h1 + 1) + w1;
  n += 2 * (h2 + 1) + w2;
  n += (w1 - w2);
  cout << n << endl;
  return 0;
}
