#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
int main() {
  long long w1, w2, h1, h2, ans;
  w1 = read(), h1 = read(), w2 = read(), h2 = read();
  ans = h1 + 1 + h2 + 1 + w1 + 1 + w2 + 1 + h1 + h2 + abs(w1 - w2);
  cout << ans << endl;
  return 0;
}
