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