#include <bits/stdc++.h>
using namespace std;
bool prime(long long n) {
  if (n < 2) return false;
  for (long long x = 2; x * x <= n; x++) {
    if (n % x == 0) return false;
  }
  return true;
}
long long largestDigit(long long n) {
  long long largest = 0;
  while (n) {
    long long r = n % 10;
    largest = max(r, largest);
    n = n / 10;
  }
  return largest;
}
uint64_t gcd(uint64_t a, uint64_t b) {
  if (a == 0) return b;
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long calcPow(long long n, long long y) {
  long long pro = 1;
  for (long long j = 1; j <= y; j++) {
    pro = pro * n;
  }
  return pro;
}
long long smallestDigit(long long n) {
  long long smallest = 10;
  while (n) {
    long long r = n % 10;
    smallest = min(r, smallest);
    n = n / 10;
  }
  return smallest;
}
long long ceil_div(long long a, long long b) { return (a + b - 1) / b; }
long long highestpowerof2(long long n) {
  if (n == 0) return 0;
  long long msb = 0;
  n = n / 2;
  while (n != 0) {
    n = n / 2;
    msb++;
  }
  return (1 << msb);
}
long long cntdigit(long long n) { return (long long)floor(log10(n) + 1); }
bool isPowerOf2(long long n) {
  if (n == 0) return 0;
  while (n != 1) {
    if (n % 2 != 0) return 0;
    n = n / 2;
  }
  return 1;
}
long long factorial(long long n) {
  if (n == 0) return 1;
  long long i = n;
  long long fact = 1;
  while (n / i != n) {
    fact = fact * i;
    i--;
  }
  return fact;
}
bool checkpal(string string1) {
  long long length = string1.size();
  int flag = 0;
  for (long long i = 0; i < length; i++) {
    if (string1[i] != string1[length - i - 1]) {
      flag = 1;
      break;
    }
    if (flag) return false;
    return true;
  }
}
vector<long long> printDivisors(long long n) {
  vector<long long> v;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i && i % 2 != 0) {
        v.push_back(i);
      } else {
        v.push_back(i);
        v.push_back(n / i);
      }
    }
  }
  return v;
}
bool inc(vector<long long> arr, long long n) {
  for (long long i = 0; i < n - 1; i++) {
    if (arr[i] >= arr[i + 1]) return false;
  }
  return true;
}
bool dec(vector<long long> arr, long long n) {
  for (long long i = 0; i < n - 1; i++) {
    if (arr[i] <= arr[i + 1]) return false;
  }
  return true;
}
string getstring(char x) {
  string s(1, x);
  return s;
}
vector<long long> segmentedSieve(long long L, long long R) {
  long long lim = sqrt(R);
  vector<bool> mark(lim + 1, false);
  vector<long long> primes;
  for (long long i = 2; i <= lim; ++i) {
    if (!mark[i]) {
      primes.emplace_back(i);
      for (long long j = i * i; j <= lim; j += i) mark[j] = true;
    }
  }
  vector<bool> isPrime(R - L + 1, true);
  for (long long i : primes)
    for (long long j = max(i * i, (L + i - 1) / i * i); j <= R; j += i)
      isPrime[j - L] = false;
  if (L == 1) isPrime[0] = false;
  vector<long long> pri;
  long long cnt = L;
  for (auto i : isPrime) {
    if (i) pri.push_back(cnt);
    cnt++;
  }
  return pri;
}
bool isPerfectSquare(long long x) {
  if (x >= 0) {
    long long sr = sqrt(x);
    return (sr * sr == x);
  }
  return false;
}
uint64_t power(uint64_t x, uint64_t y, uint64_t p) {
  uint64_t res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long findGCD(vector<long long> arr, long long n) {
  long long result = (long long)arr[0];
  for (long long i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
const int MAX = 1000001;
int factor[MAX] = {0};
void generatePrimeFactors() {
  factor[1] = 1;
  for (int i = 2; i < MAX; i++) factor[i] = i;
  for (int i = 4; i < MAX; i += 2) factor[i] = 2;
  for (int i = 3; i * i < MAX; i++) {
    if (factor[i] == i) {
      for (int j = i * i; j < MAX; j += i) {
        if (factor[j] == j) factor[j] = i;
      }
    }
  }
}
int calculateNoOFactors(int n) {
  if (n == 1) return 1;
  int ans = 1;
  int dup = factor[n];
  int c = 1;
  int j = n / factor[n];
  while (j != 1) {
    if (factor[j] == dup)
      c += 1;
    else {
      dup = factor[j];
      ans = ans * (c + 1);
      c = 1;
    }
    j = j / factor[j];
  }
  ans = ans * (c + 1);
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long w1, h1, w2, h2;
  cin >> w1 >> h1 >> w2 >> h2;
  long long ans = w1 + 2 + 2 * h1 + 2 * h2 + w2 + 2 + w1 - w2;
  cout << ans;
  return 0;
}
