```py
#动态规划解决
#nowcoder不能导入numpy模块,只能手工创建二维数组
#重点注意二维数据的创建方法,重点注意其横竖坐标,注意注意
#dp = [[1 for i in range(n+1)] for j in range(m+1)],横坐标是 n, 竖坐标是m

while True:
    try:
        n,m = map(int, input().split(' '))
        dp = [[1 for i in range(n+1)] for j in range(m+1)]
        for i in range(1,m+1):
            for j in range(1,n+1):
                dp[i][j] = dp[i-1][j]+dp[i][j-1]
        print(dp[m][n])
    except:
        break