m,n = map(int,input().split()) n_list = [0 for i in range(n)] result_list = [] #使用迭代的方法 def dfx(n_list): if sum(n_list) < m: tmp_list = [] for i in range(n): tmp = n_list.copy() tmp[i] += 1 tmp.sort() if tmp not in tmp_list: tmp_list.append(tmp) for i in tmp_list: dfx(i) # del tmp pass else: tmp = n_list.copy() tmp.sort() if tmp not in result_list: result_list.append(tmp) dfx(n_list) print(len(result_list))