#include <bits/stdc++.h>
using namespace std;
int main() {
  int l1, h1, l2, h2;
  scanf("%d %d %d %d", &l1, &h1, &l2, &h2);
  printf("%d\n", (h1 + h2) + l2 + (h2 - 1) + (l1 - l2 - 1) + 1 + h1 + l1 + 5);
  return 0;
}
