bb = tuple(map(int, input().split()))
xy = [[0] * 24 for _ in range(24)]
xy[2][2:24] = [1] * 22
for i in range(2,24,1):
xy[i][2] = 1
no = []
no.append([bb[2] + 2, bb[3] + 2])
no.append([bb[2] + 4, bb[3] + 3])
no.append([bb[2] + 3, bb[3] + 4])
no.append([bb[2] + 1, bb[3] + 4])
no.append([bb[2], bb[3] + 3])
no.append([bb[2], bb[3] + 1])
no.append([bb[2] + 1, bb[3]])
no.append([bb[2] + 3, bb[3]])
no.append([bb[2] + 4, bb[3] + 1])
x = 3
y = 3
while x < 24:
while y < 24:
xy[x][y] = xy[x - 1][y] + xy[x][y - 1]
for i in no:
if i == [x, y]:
xy[x][y] = 0
y += 1
x += 1
y = 3
print(xy[bb[0] + 2][bb[1] + 2])