#include <bits/stdc++.h>
const long double PI = acos(-1);
const long double eps = 0.0000000001;
const long long INF = 0x3fffffffffffffff;
long long ans = 1, n, m, d, dx, dy;
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n >> dx >> m >> dy;
  d = llabs(dx - dy);
  for (long long i = 1; i <= n; ++i)
    if (i + d > m) ++ans;
  for (long long i = 1; i <= m; ++i)
    if (i + d > n) ++ans;
  for (long long i = 1; i <= n; ++i) {
    long long b;
    if (d >= i) {
      b = std::min(std::min(m, i * 2), std::max(0ll, i - (d - m)));
      if (b >= 1) ans -= 1;
      if (b >= i * 2) ans -= 1;
      ans += b * 2;
    } else {
      long long lst = i - d - 1;
      b = std::max(std::min(m - lst, i + d - lst), 0ll);
      if (b >= 1) ans -= 1;
      if (b >= i + d - lst) ans -= 1;
      ans += b * 2;
    }
  }
  std::cout << ans << std::endl;
  return 0;
}
