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