#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, i, e, f, g, n, m, k, l, maxx;
map<long long, long long> mp;
int main() {
  cin >> a >> b >> c >> d;
  k += a + 2 + b + b;
  k += c + 2 + d + d;
  cout << k + a - c;
}
