# memo = [0,1]
# def fib(n):
# if len(memo) > n:
# return memo[n]
# else:
# memo.append(fib(n-1)+fib(n-2))
# return memo[n]
# print((fib(int(input()))) % 10009)
# memo = [0] * 1000000
# def fibo(k):
# if k <= 2:
# memo[k] = 1
# return memo[k]
# if memo[k] != 0:
# return memo[k]
# memo[k] = fibo(k-1) + fibo(k-2)
# return memo[k]
# print(fibo(10))
# def exchanger(n):
# if n >= 2 :
# if n % 2 == 1:
# exchanger(n//2)
# print('1',end = '')
# else:
# exchanger(n//2)
# print('0',end = '')
# else:
# if n % 2 == 1:
# print('1',end = '')
# else:
# print('0',end = '')
# exchanger(int(input()))
# def f(n):
# if n == 1:
# print('1')
# return ;
# if n % 2 == 1:
# print(n)
# f(3 * n + 1)
# else:
# print(n)
# f(n//2)
# f(int(input()))
# q =[]
# def g(n):
# if n== 1:
# q.append(n)
# return;
# if n % 2 == 1:
# q.append(n)
# g(3 * n + 1)
# else:
# q.append(n)
# g(n // 2)
# g(int(input()))
# q.reverse()
# print("\n".join(map(str,q)))
# import sys
# sys.setrecursionlimit(100)
# B= True
# memo =[]
# y = 0
# for i in range(1000):
# memo1 = [0]*1000
# memo.append(memo1)
# def supersum(a,b):
# x = 0
# if a == 0:
# memo[x+1][b+1] = b
# return 0
# for i in range(1,b+1):
# i = x
# supersum(a-1,i)
# while B:
# try:
# a,b = map(int,input().split())
# for i in range(a):
# memo1 = [0]*b
# memo.append(memo1)
# supersum(a,b)
# for i in range(a):
# y += sum(memo[i])
# print(y)
# except:
# B = False
# def triangle1(n):
# if n == 0:
# print()
# return 0
# print('*',end = ' ')
# return triangle1(n-1)
# def triangle2(k):
# if k == 0:
# return 0
# triangle2(k-1)
# triangle1(k)
# triangle2(int(input()))
import sys
sys.setrecursionlimit(1000000)
d = [[1]*50 for i in range(50)]
def pha(r,c):
if r == 0 and c == 0:
d[r][c] = 1
return d[r][c]
elif r == 0 and c == 1:
d[r][c] = 1
return d[r][c]
elif r == 1 and c == 0:
d[r][c] = 1
return d[r][c]
else:
d[r][c] = pha(r-1,c) + pha(r,c-1)
return d[r][c]
r,c = map(int,input().split())
print(pha(r-1,c-1))