#include <bits/stdc++.h>
using namespace std;
int main() {
  int w[2], h[2];
  cin >> w[0] >> h[0] >> w[1] >> h[1];
  cout << (2 * h[0]) + (2 * h[1]) + w[0] + w[1] + 4 + abs(w[0] - w[1]) << endl;
  return 0;
}
