40_C. Berland Square
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>
```python
def readGen(trans):
	while 1:
		for x in input().split():
			yield(trans(x))
	
readint=readGen(int)

[N,x,M,y]=(next(readint) for i in range(4))

d=abs(y-x)

def interval(a,b): return range(a,b+1)

def case1(N,M,d): # d>=N
	ans=0
	for r in interval(1, min(M,d-N)):
		ans+=1
	if (M<=d-N):
		return ans
	for r in interval(d-N+1, min(M,d)):
		ans+=2*(N+r-d)
	if (M<=d):
		return ans
	for r in interval(d+1,min(M,d+N)):
		ans+=2*(d+N-r+1)
	if (M<=d+N):
		return ans
	for r in interval(d+N+1,M):
		ans+=1
	return ans

def partA(N,M,d):
	ans=0
	for r in interval(1,min(M,d)):
		ans+=2*r-1
	if (M<d+1):
		return ans
	for r in interval(d+1,min(M,2*d)):
		ans+=2*(2*d-r)+1
	return ans

def partB(N,M,d):
	ans=0
	bound1=min(2*d,N-d)
	for r in interval(1,min(M,bound1)):
		ans+=2*(r-1)+1
	if (M<=bound1):
		return ans
	if (2*d<=N-d):
		for r in interval(bound1+1,min(M,N-d)):
			ans+=4*d
		if (M<=N-d):
			return ans
	if (2*d>N-d):
		for r in interval(bound1+1,min(M,2*d)):
			ans+=2*(N-d)+1
		if (M<=2*d):
			return ans
	bound2=max(2*d,N-d)
	for r in interval(bound2+1,min(M,d+N)):
		ans+=2*(d+N-r)+2
	if (M<=d+N):
		return ans
	for r in interval(d+N+1,M):
		ans+=1
	return ans
	
def case2(N,M,d): # d<N
	return partA(N,M,d)+partB(N,M,d)

def remain(N,M,d):
	if (M>=d+N):
		return 1
	if (M>d):
		return d+N-M+1
	if (M<=d):
		return N+1
	
def calc(N,M,d):
	if (N<=d): return remain(N,M,d)+case1(N,M,d)
	else: return remain(N,M,d)+case2(N,M,d)

print(calc(N,M,d))

```