#include <bits/stdc++.h>
using namespace std;
long long n1, n2, c1, c2;
int first_one(int r) { return max(c2 - c1 - r + 1, r - c2 + c1); }
int intersect(int r1, int r2) {
  return c1 + r1 > c2 - r2 && c1 - r1 < c2 - r2 && c1 + r1 <= c2 + r2;
}
int bs(int r, int s, int e = n2) {
  int best = -1;
  while (s <= e) {
    int mid = (s + e) >> 1;
    if (intersect(r, mid))
      best = mid, s = mid + 1;
    else
      e = mid - 1;
  }
  assert(best != -1);
  return best;
}
int fullyin(int r) { return c2 - r >= c1 - n1 && c2 + r <= c1 + n1; }
int main() {
  cin >> n1 >> c1 >> n2 >> c2;
  if (c2 < c1) swap(c1, c2), swap(n1, n2);
  long long ans = 1;
  for (int i = 1; i <= n1; i++) {
    int first = first_one(i);
    if (first > n2) {
      ans++;
      continue;
    }
    ans += 2 * (bs(i, first) - first + 1);
  }
  for (int i = 1; i <= n2; i++)
    if (!fullyin(i)) ans++;
  cout << ans << "\n";
  return 0;
}
