def apple(m, n):
    dp = [[0 for i in range(n+1)] for j in range(m+1)]
    for i in range(1, m+1):
        dp[i][1] = 1
        for j in range(1, n+1):
            if i < j:
                dp[i][j] = dp[i][j-1]
            elif i == j:
                dp[i][j] = dp[i] [j-1] + 1
            else:
                dp[i][j] = dp[i-j][j] + dp[i][j-1]
    print(dp[m][n])
        

while True:
    try:
        m, n = map(int, input().split())
        apple(m, n)
    except:
        break