#include <bits/stdc++.h>
using namespace std;
int N, x, M, y;
int main(void) {
  scanf("%d%d%d%d", &N, &x, &M, &y);
  long long ans = 0;
  if (x > y) {
    swap(N, M);
    swap(x, y);
  }
  for (int i = 0; i < N; i++) {
    int l = abs((x + i + (x + i >= y)) - y), r = abs((x - i - 1) - y);
    if (l == 0) l = 1;
    if (r == 0) r = 1;
    if (l > M + 1) l = M + 1;
    if (r > M + 1) r = M + 1;
    if (l > r) swap(l, r);
    ans += (r - l) * 2 + (l == r);
  }
  for (int i = 1; i <= M; i++)
    if (y + i > N + x) ++ans;
  ++ans;
  printf("%I64d\n", ans);
  return 0;
}
