W = int(input()) D = int(input()) for d in range(1,D+1)[::-1]: work = W // pow(d,2) if d == 1: print(work) W -= work