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;
int r1, c1, r2, c2;
long long brv;
int get_ip(int C1, int R1, int C2, int R2) {
  if (C1 > C2) C1 = 2 * C2 - C1;
  int L = max(C1 - R1, C2 - R2), R = min(C1 + R1, C2 + R2);
  if (L > R) return 0;
  int ret = 2 * (R - L + 1);
  if (R >= C2) ret -= (2 + 4 * (R - C2));
  if (C1 - R1 == L && abs(L - C2) <= R2 && abs(L - C2) > 0) {
    if (L < C2)
      ret--;
    else
      ret++;
  }
  if (C1 + R1 == R && abs(R - C2) <= R2 && abs(R - C2) > 0) {
    if (R < C2)
      ret--;
    else
      ret++;
  }
  return ret;
}
int main() {
  int i, f1 = 0, f2 = 0, H;
  cin >> r1 >> c1 >> r2 >> c2;
  for (i = 1; i <= r1; ++i) {
    H = get_ip(c1, i, c2, r2);
    if (H != 0)
      brv += H;
    else
      f1++;
  }
  for (i = 1; i <= r2; ++i)
    if (get_ip(c2, i, c1, r1) == 0) f2++;
  if (f1 == r1 && f2 == r2)
    cout << r1 + r2 + 1 << '\n';
  else
    cout << 2 + brv + f1 + f2 << '\n';
  return 0;
}
