#include <bits/stdc++.h>
using namespace std;
long long n, x, m, y;
int main() {
  cin >> n >> x >> m >> y;
  long long ans = 0, le, ri;
  for (long long i = m; i >= 1; i--) {
    le = y - i;
    ri = y + i;
    if (x <= le) {
      if (x + n <= le)
        ans++;
      else {
        ans += (min(x + n, ri - 1) - le) * 2;
      }
    } else if (x >= ri) {
      if (x - n >= ri)
        ans++;
      else {
        ans += (ri - max(x - n, le + 1)) * 2;
      }
    } else {
      if (x - n > le && x + n < ri)
        ans++;
      else if (x < y) {
        ans += (min(ri - 1, x + n) - (x + x - le) + 1) * 2;
      } else
        ans += (x - (ri - x) - max(le + 1, x - n) + 1) * 2;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (x - i < y - m || x + i > y + m) ans++;
  }
  ans++;
  cout << ans << endl;
  return 0;
}
