#include <bits/stdc++.h>
using namespace std;
int main() {
  int w_1, h_1, w_2, h_2;
  cin >> w_1 >> h_1 >> w_2 >> h_2;
  if (w_1 == w_2)
    cout << 2 * (w_1 + h_1 + h_2) + 4 << endl;
  else
    cout << 2 * (h_1 + h_2 + w_1) + 4 << endl;
  return 0;
}
