#include <bits/stdc++.h>
using namespace std;
bool endline = false;
bool endline2 = false;
bool space = true;
template <class T>
istream &operator>>(istream &in, vector<T> &v) {
  for (auto &i : v) {
    in >> i;
  }
  return in;
}
template <class T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  for (auto i : v) {
    out << i;
    if (!endline2) {
      if (space) {
        cout << ' ';
      }
    } else {
      cout << '\n';
    }
  }
  if (endline && !endline2) cout << '\n';
  return out;
}
template <class T, class U>
istream &operator>>(istream &in, pair<T, U> &a) {
  in >> a.first >> a.second;
  return in;
}
template <class T, class U>
ostream &operator<<(ostream &out, const pair<T, U> &a) {
  out << a.first << ' ' << a.second;
  return out;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  cout << 2 * (w1 + h1 + h2 + 2);
  return 0;
}
