#include <bits/stdc++.h>
using namespace std;
template <typename T>
T abs(T a) {
  return a < 0 ? -a : a;
}
template <typename T>
T sqr(T a) {
  return a * a;
}
const int INF = (int)1e9;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 500000;
int tr[4 * N];
void update(int qlf, int qrg, int v, int idx = 0, int lf = 0, int rg = N - 1) {
  if (qlf == lf && qrg == rg) {
    tr[idx] += v;
  } else {
    int mid = (lf + rg) >> 1;
    if (qlf <= mid) update(qlf, min(qrg, mid), v, 2 * idx + 1, lf, mid);
    if (mid + 1 <= qrg)
      update(max(qlf, mid + 1), qrg, v, 2 * idx + 2, mid + 1, rg);
  }
}
int getSum(int i, int idx = 0, int lf = 0, int rg = N - 1) {
  if (lf == rg)
    return tr[idx];
  else {
    int mid = (lf + rg) >> 1;
    if (i <= mid)
      return getSum(i, 2 * idx + 1, lf, mid) + tr[idx];
    else
      return getSum(i, 2 * idx + 2, mid + 1, rg) + tr[idx];
  }
}
int n, m;
int pn, pm;
int main() {
  cin >> n >> pn >> m >> pm;
  pn += 210000;
  pm += 210000;
  int pi = 0;
  long long ans = n + 1;
  for (int i = 0; i < int(m); ++i) {
    while (pi < n && pi + 1 < abs(pn - pm) + i + 1) {
      int lf = pn - pi + 1;
      int rg = pn + pi - 1;
      if (lf <= rg) update(lf, rg, 2);
      update(pn - pi, pn - pi, 1);
      if (pi != 0) {
        update(pn + pi, pn + pi, 1);
        if (pn < pm)
          update(pn - pi, pn - pi, 1);
        else
          update(pn + pi, pn + pi, 1);
      }
      pi++;
    }
    ans += getSum(pm - i - 1) + getSum(pm + i + 1) + 1;
  }
  cout << ans << endl;
  return 0;
}
