#include <bits/stdc++.h>
using namespace std;
int r1, c1, r2, c2;
long long brv;
int get_ip(int C1, int R1, int C2, int R2) {
  if (C1 > C2) C1 = 2 * C2 - C1;
  int L = max(C1 - R1, C2 - R2), R = min(C1 + R1, C2 + R2);
  if (L > R) return 0;
  int ret = 2 * (R - L + 1);
  if (R >= C2) ret -= (2 + 4 * (R - C2));
  if (C1 - R1 == L && abs(L - C2) <= R2 && abs(L - C2) > 0) {
    if (L < C2)
      ret--;
    else
      ret++;
  }
  if (C1 + R1 == R && abs(R - C2) <= R2 && abs(R - C2) > 0) {
    if (R < C2)
      ret--;
    else
      ret++;
  }
  return ret;
}
int main() {
  int i, f1 = 0, f2 = 0, H;
  cin >> r1 >> c1 >> r2 >> c2;
  for (i = 1; i <= r1; ++i) {
    H = get_ip(c1, i, c2, r2);
    if (H != 0)
      brv += H;
    else
      f1++;
  }
  for (i = 1; i <= r2; ++i)
    if (get_ip(c2, i, c1, r1) == 0) f2++;
  if (f1 == r1 && f2 == r2)
    cout << r1 + r2 + 1 << '\n';
  else
    cout << 2 + brv + f1 + f2 << '\n';
  return 0;
}
