#include <bits/stdc++.h>
using namespace std;
long long solve(int A, int B, int X) {
  long long sum = 0;
  for (int a = 1; a <= A; a++) {
    int lo = max(1, a - X + 1), hi = min(X + a - 1, B);
    int b = a - X;
    if (b >= 1 && b <= B && a + b > X) {
      sum++;
    }
    b = X + a;
    if (b >= 1 && b <= B && a + b > X) {
      sum++;
    }
    b = X + 1 - a;
    if (b >= lo && b <= hi) {
      sum++;
    }
    int lowerb = max(lo, X + 2 - a);
    if (lowerb <= hi) {
      sum += (hi - lowerb + 1) * 2;
    }
  }
  if (B <= X) {
    sum += A;
  } else {
    sum += max(0, A - (B - X));
  }
  if (A <= X) {
    sum += B;
  } else {
    sum += max(0, B - (A - X));
  }
  sum++;
  return sum;
}
int main() {
  assert(solve(2, 2, 1) == 8);
  assert(solve(1, 1, 1) == 4);
  assert(solve(1, 1, 2) == 3);
  assert(solve(3, 4, 4) == 17);
  assert(solve(4, 3, 4) == 17);
  for (int a = 1; a <= 20; a++) {
    for (int b = 1; b <= a; b++) {
      for (int c = 1; c <= 20; c++) {
        assert(solve(a, b, c) == solve(b, a, c));
      }
    }
  }
  int n, x, m, y;
  scanf("%d%d%d%d", &n, &x, &m, &y);
  int A = n, B = m, X = abs(x - y);
  cout << solve(A, B, X) << endl;
}
