#include <bits/stdc++.h>
using namespace std;
int a[2], b[2], s;
int main() {
  cin >> a[0];
  cin >> a[1];
  cin >> b[0];
  cin >> b[1];
  s = ((a[0] + 1) * 2) + ((a[1] + 1) * 2) + ((b[0] + 1) * 2) +
      ((b[1] + 1) * 2) - ((b[0] * 2) + 4);
  cout << s;
}
