#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d, ans;
  scanf("%d%d%d%d", &a, &b, &c, &d);
  ans = (a + 2) * (b + d + 2) - a * b - c * d - (a - c) * d;
  printf("%d\n", ans);
  return 0;
}
