#include <bits/stdc++.h>
using namespace std;
long long ans = 0;
int n, m, x, y;
int main() {
  while (scanf("%d%d%d%d", &n, &x, &m, &y) == 4) {
    if (x > y) {
      n ^= m ^= n ^= m;
      x ^= y ^= x ^= y;
    }
    ans = n + 1;
    int l, r;
    for (int i = 1; i <= m; ++i) {
      l = y - i;
      r = y + i;
      if (l <= x - n || l >= x + n)
        ++ans;
      else {
        r = min(r - 1, n + x);
        if (l >= x)
          ans += ((r - l) << 1);
        else
          ans += ((r - x - (x - l)) << 1) + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
