#include <bits/stdc++.h>
using namespace std;
long long n, x, m, y;
int main() {
  while (~scanf("%lld %lld %lld %lld", &n, &x, &m, &y)) {
    if (x > y) {
      swap(x, y);
      swap(n, m);
    }
    long long ans = n + 1;
    for (int i = 1; i <= m; i++) {
      long long 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 += 2 * (r - l);
        else
          ans += 2 * (r - x - (x - l)) + 1;
      }
    }
    printf("%lld\n", ans);
  }
}
