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