#include <bits/stdc++.h>
using namespace std;
int a1, a2, b1, b2, sum;
int main() {
  cin >> a1 >> b1;
  cin >> a2 >> b2;
  sum = a1 + b1 * 2 + 2 + a2 + b2 * 2 + 2 + abs(a1 - a2);
  cout << sum << endl;
  return 0;
}
