stop=[]
Bx,By,Mx,My=map(int,input().split())
result=[[1 for i in range(By+1)]for j in range(Bx+1)]
stop.append([Mx,My])
stop.append([Mx-2,My-1])
stop.append([Mx-2,My+1])
stop.append([Mx-1,My-2])
stop.append([Mx-1,My+2])
stop.append([Mx+1,My-2])
stop.append([Mx+1,My+2])
stop.append([Mx+2,My-1])
stop.append([Mx+2,My+1])
for i in range(1,Bx+1):
for j in range(1,By+1):
m=0
n=0
if [i,j] not in stop:
if [i-1,j] not in stop:m=result[i-1][j]
if [i,j-1] not in stop:n=result[i][j-1]
result[i][j]=m+n
else:result[i][j]=0
print(result[Bx][By])