#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e9 + 2;
const long long MAX2 = 1e5 + 1;
const long long mod = (pow(10, 9) + 7);
int tc = 1;
const double eps = 1e-9;
const double pi = acos(-1.0);
const long long int mx = 1e5;
int main() {
  long long w1, w2, h1, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  long long area =
      (h2 + h1 + 2) + (w1 + 1) + (w2 + 1) + (h2 - 1) + (h1 + 1) + w1 - w2;
  cout << area << '\n';
}
