from functools import cache @cache def f(m,n): if m<0: return 0 if m==1 or n==1 or m==0: # m==0 剪枝,cache提速 return 1 return f(m,n-1)+f(m-n,n) while True: try: m,n=map(int,input().split()) print(f(m,n)) except: break