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