w = int(input()) d = int(input()) a=0 for i in list(reversed(range(1,d+1))): a=int(w/(i*i)) w-=a print(a)