def methods(n, m):
if n == 0 or m == 0:
return 1
if n == 1 and m == 1:
return 2
if (n == 2 and m == 1) or (n == 1 and m == 2):
return 3
else:
return methods(n-1, m) + methods(n, m-1)
while True:
try:
n, m = map(int, input().split())
result = methods(n, m)
print(result)
except:
break