xb,yb,xh,yh = map(int,input().split())
h = [(xh-2,yh-1),(xh-2,yh+1),(xh-1,yh-2),(xh-1,yh+2),(xh+2,yh-1),(xh+2,yh+1),(xh+1,yh-2),(xh+1,yh+2),(xh,yh)]
c = 0
def guohe(x,y):
global c
if x < xb:
if (x+1,y) not in h:
guohe(x+1,y)
if y < yb:
if (x,y+1) not in h:
guohe(x,y+1)
if x == xb and y == yb:
c += 1
guohe(0,0)
print(c)