#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int w1, h1, w2, h2;
int ans;
int main() {
scanf("%d %d %d %d", &w1, &h1, &w2, &h2);
ans += (h1 * 2 + 2 + w1);
if (w1 == w2) {
ans += (h2 * 2 + 2 + w2);
}
else {
ans += (h2 * 2 + 2 + w2);
ans += (w1 - w2);
}
printf("%d\n", ans);
return 0;
}