#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, m, y;
  cin >> n >> x >> m >> y;
  long long col = n + m + 1;
  if (n > m) {
    int q = n;
    n = m;
    m = q;
  }
  int s = x - y, a, b;
  if (s < 0) s = -s;
  for (int i = 1; i <= n; i++) {
    a = s - i + 1;
    if (a < (i - s + 1)) {
      col++;
      a = i - s + 1;
    }
    if (a <= m) {
      b = min(s + i - 1, m);
      col += (b - a) * 2 + 1;
    }
  }
  cout << col;
  return 0;
}
