dp=[0 for i in range(2000)] n,k=map(int,input().split()) num=[i for i in range(1,k+1)] dp[0]=1 for i in range(k): for j in range(num[i],n+1): dp[j]+=dp[j-num[i]] print(dp[n])