#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = long long;
using llu = long long unsigned;
using ld = long double;
const ld EPS = 1e-9;
inline int cmp(ld first, ld second = 0, ld tol = EPS) {
  return (first <= second + tol) ? (first + tol < second) ? -1 : 0 : 1;
}
const int MOD = 1;
inline int mod(ll first, int m = MOD) { return (int)(((first % m) + m) % m); }
int main() {
  ll w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  w1 += 2, w2 += 2, ++h1, h2++;
  cout << (2 * w1 + 2 * (h1 + h2) - 4) << '\n';
  return 0;
}
