#include <bits/stdc++.h>
using namespace std;
void ___() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void data() {
  freopen("name.in", "r", stdin);
  freopen("name.out", "w", stdout);
}
const int N = 3e5 + 500;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
int main() {
  ___();
  int w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  int x = w1 - w2;
  cout << 2 * (h1 + h2 + w1 + 2);
  return 0;
}
