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>
import java.awt.geom.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;

public class Main {
	public Main() throws IOException {
		String input;

		input = br.readLine();
		work(input, 0);

		System.out.print(sb);
	}

	private void work(String input, int t) {
		//debug(t, input);
		String[] inputArray = input.split(" ");
		int n = Integer.valueOf(inputArray[0]);
		int x = Integer.valueOf(inputArray[1]);
		int m = Integer.valueOf(inputArray[2]);
		int y = Integer.valueOf(inputArray[3]);
		long ret = 1;
		int yPos = y;
		int yPosOrg = y;
		int num = 0;
		int direct = 0;

		if (x == y) {
			sb.append(ret + Math.max(n, m));
			return;
		}

		ret += n + m;

		if (x > y) {
			direct = 1;
			if ((x - n) >= y) {
				yPos += (x - n - y);
			}
		} else if (y > x) {
			direct = -1;
			if ((x + n) <= y) {
				yPos -= (y - n - x);
			}
		}

		if (Math.abs(yPos - y) >= m) {
			sb.append(ret);
			return;
		}

		yPosOrg = yPos;
		yPos += direct;
		num = 1;
		ret += num;
		while (Math.abs(yPos - y) < m) {
			if (Math.abs(yPos - yPosOrg) < Math.abs(x - yPosOrg)) {
				num += 2;
			} else if (Math.abs(yPos - yPosOrg) == Math.abs(x - yPosOrg)) {
				num -= 1;
			} else {
				num -= 2;
			}

			if (Math.abs(yPosOrg - (yPos - yPosOrg) - x) <= n) {
				num += 2;
			}

			if (num > 0)
				ret += num;

			yPos += direct;
		}

		sb.append(ret);
	}

	StringBuilder sb = new StringBuilder();
	BufferedReader br = new BufferedReader(
		new InputStreamReader(System.in));

	public static void main(String[] args) throws IOException {
			new Main();
	}

	public static void debug(Object... arr) {
		System.err.println(Arrays.deepToString(arr));
	}
}
