#include <bits/stdc++.h>
using namespace std;
long long w1, h1, w2, h2, w, h;
int main() {
  scanf("%lld %lld %lld %lld", &w1, &h1, &w2, &h2);
  w = max(w1, w2) + 2;
  h = h1 + h2 + 2;
  printf("%lld\n", h * 2 + w * 2 - 4);
  return 0;
}
