def fun(m, n):

if m < 0 or n <= 0:
    return 0
if m == 1 or n == 1:
    return 1
else:
    return fun(m, n - 1) + fun(m - n, n)

while True:

try:
    m, n = [int(i) for i in input().split()]
    k = fun(m, n)
    print(k)
except:
    break