#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, x, y;
  cin >> n >> x >> m >> y;
  long long a = max(x - y, y - x);
  if (a == 0) {
    cout << max(m, n) + 1;
    return 0;
  }
  long long res = n + 1;
  for (long long r = 1; r <= m; ++r) {
    if (a - r >= n || a - r <= -n)
      ++res;
    else if (a + r <= n)
      res += (a - r >= 0) ? 4 * r - 2 : 4 * a - 1;
    else
      res += (a - r >= 0) ? (n - a + r) * 2 : (n - r + a + 1) * 2 - 1;
  }
  cout << res;
  return 0;
}
