#include <bits/stdc++.h>
int main() {
  int w1, h1, w2, h2, a, b, sum;
  scanf("%d%d%d%d", &w1, &h1, &w2, &h2);
  a = (h2 + h1 + 2) * 2;
  b = w1 * 2;
  sum = a + b;
  printf("%d\n", sum);
  return 0;
}
