Last year the world's largest square was built in Berland. It is known that the square can be represented as an infinite plane with an introduced Cartesian system of coordinates. On that square two sets of concentric circles were painted. Let's call the set of concentric circles with radii 1, 2, ..., K and the center in the point (z, 0) a (K, z)-set. Thus, on the square were painted a (N, x)-set and a (M, y)-set. You have to find out how many parts those sets divided the square into.

Input

The first line contains integers N, x, M, y. (1 ≤ N, M ≤ 100000, - 100000 ≤ x, y ≤ 100000, x ≠ y).

Output

Print the sought number of parts.

Examples

Input

1 0 1 1


Output

4


Input

1 0 1 2


Output

3


Input

3 3 4 7


Output

17

Note

Picture for the third sample:

<image>
#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;
}
