Developing tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.

A field map consists of hexagonal cells. Since locations sizes are going to be big, a game designer wants to have a tool for quick filling of a field part with identical enemy units. This action will look like following: a game designer will select a rectangular area on the map, and each cell whose center belongs to the selected rectangle will be filled with the enemy unit.

More formally, if a game designer selected cells having coordinates (x_1, y_1) and (x_2, y_2), where x_1 ≤ x_2 and y_1 ≤ y_2, then all cells having center coordinates (x, y) such that x_1 ≤ x ≤ x_2 and y_1 ≤ y ≤ y_2 will be filled. Orthogonal coordinates system is set up so that one of cell sides is parallel to OX axis, all hexagon centers have integer coordinates and for each integer x there are cells having center with such x coordinate and for each integer y there are cells having center with such y coordinate. It is guaranteed that difference x_2 - x_1 is divisible by 2.

Working on the problem Petya decided that before painting selected units he wants to output number of units that will be painted on the map.

Help him implement counting of these units before painting.

 [Image] 


-----Input-----

The only line of input contains four integers x_1, y_1, x_2, y_2 ( - 10^9 ≤ x_1 ≤ x_2 ≤ 10^9,  - 10^9 ≤ y_1 ≤ y_2 ≤ 10^9) — the coordinates of the centers of two cells.


-----Output-----

Output one integer — the number of cells to be filled.


-----Examples-----
Input
1 1 5 5

Output
13

Difficulty: interview

Starter code:

Solutions:
x1, y1, x2, y2 = map(int, input().split())

dx, dy = (x2 - x1) // 2, (y2 - y1) // 2
print(dx + 1 + (2 * dx + 1) * dy)

x1,y1,x2,y2 = list(map(int,input().split(' ')))
b = int((y2 - y1 + 1)/2) + 1
s = b - 1
l = x2 - x1 + 1
ans = b * int((l+1)/2) + s * int(l/2)
print(ans)


x1,y1,x2,y2 = map(int, input().split())
x = x2 - x1
y = y2 - y1
print((y//2+(y//2+1))*x//2+y//2+1)

(x, y, x1, y1) = list(map(int, input().split()))
res1 = (y1 - y + 1) // 2
res2 = (y1 - y + 1) - res1
resx1 = (x1 - x + 1) // 2
resx2 = (x1 - x + 1) - resx1
print(res1 * resx1 + res2 * resx2)


x1, y1, x2, y2 = map(int, input().split())
ans1 = ((x2 - x1) // 2 + 1) * ((y2 - y1) // 2 + 1)
x1 += 1
y1 += 1
x2 -= 1
y2 -= 1
ans2 = 0
if x1 <= x2 and y1 <= y2:
  ans2 = ((x2 - x1) // 2 + 1) * ((y2 - y1) // 2 + 1)
print(ans1 + ans2)

x1, y1, x2, y2 = list(map(int, input().split()))
print(((y2 - y1) // 2 + 1) * ((x2 - x1 + 2) // 2) + ((y2 - y1) // 2 + (y2 - y1) % 2) * ((x2 - x1 + 1) // 2))

#if y0 % 2 == 0\
#(x2 // 2 * 2) - ((x1 + 1) // 2 * 2)
#if y0 % 2 == 1\
#()


3

x1, y1, x2, y2 = [int(i) for i in input().split()]

dx = x2 - x1 + 1
dy = (y2 - y1) // 2 + 1

if dx%2 == 1:
	ans = dy * (dx//2 + 1) + (dy-1) * (dx//2)
else:
	ans = dx*dy

print(ans)


x1,y1,x2,y2 = map(int,input().split())
s = (x2-x1+1)*((y2-y1+1)//2) + ((x2-x1+2)//2)*((y2-y1+1)%2)
print(s)

import re
st = input()
s = re.split(r'[\s]', st)
x1 = int(s[0])
y1 = int(s[1])
x2 = int(s[2])
y2 = int(s[3])
s = ((y2 - y1) // 2 + 1) * ((x2 - x1) // 2 + 1) + ((y2 - y1) // 2 * (x2 - x1) // 2)
print (s)

x,y,a,b = map(int,input().split(" "))


result = ( a-x+1 ) * ( (b-y)//2 + 1 ) - ( (a-x)//2 )

print(result)

x1, y1, x2, y2 = [int(i) for i in input().split()]

t = y2 - y1 + 1
h = (x2 - x1 + 2) // 2

print(t // 2 * (h - 1) + (t // 2 + t % 2) * h)


x, u, y, v = list(map(int, input().split()))
N, M = y - x + 1, v - u + 1
n, m = (N >> 1) * (N&1), (M >> 1) * (M&1)
print((N - n)*(M - m) + n*m)


ch=input()
d=ch.split(" ")
x1=int(d[0])
y1=int(d[1])
x2=int(d[2])
y2=int(d[3])

nby=(y2-y1)//2+1
nbx=(x2-x1)//2+1
print(nby*nbx+(nby-1)*(nbx-1))


x1, y1, x2, y2 = map(int, input().split())

d = (x2 - x1) // 2 + 1
e = (y2 - y1) // 2 + 1
if (y2 - y1) % 2 == 0:
	ans = d * e + (d - 1) * (e - 1)
else:
	ans = (2 * d - 1) * (e - 1)
print(ans)

x1, y1, x2, y2 = [int(x) for x in input().split()]
print((x2-x1+1)*(y2-y1+1)//2 + ((y2-y1)%2 == 0))



x1, y1, x2, y2 = map(int, input().split())

dx = x2 - x1
dy = y2 - y1

#ux = False
#uy = False

#if dx % 2 == 1:
#  ux = True
#  dx += 1

#if dy % 2 == 1:
#  uy = True
#  dy += 1

resx = int(dx/2+1)
resy = int(dy/2+1)

total = resx*resy + (resx-1)*(resy-1)

print (total)
return

if ux or uy:
    total -= 1
    if ux:
        total -= dy/2
    if uy:
        total -= dx/2

print (int(total))

x1, y1, x2, y2 = map(int, input().split())
a, b = (x2 - x1) // 2, (y2 - y1) // 2
print(a * b + (a + 1) * (b + 1))

x1, y1, x2, y2 = map(int, input().split())

x = (x2 - x1) // 2
y = (y2 - y1) // 2

print(2 * x * y + x + y + 1)

x1, y1, x2, y2 = input().split()
dx, dy = int(x2)-int(x1), int(y2)-int(y1)
if(dy%2!=0):
    print(dy+1)//2*(dx+1)
else:
    print((dy//2+1)*(dx//2+1)+dy//2*dx//2)

a, b, c, d = map(int, input().split(' '))
dy = (d-b)//2+1
dx = c - a + 1
print(dy*dx - (dx//2))