#include <bits/stdc++.h>
using namespace std;
int main() {
  int w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  int s1 = (w1 + 2) * (h1 + 2);
  int s2 = (w2 + 2) * (h2 + 2);
  int sdiff = w1 * h1 + w2 * h2;
  int common = (w2 + 2) * 2;
  cout << s1 + s2 - common - sdiff;
  return 0;
}
