W=int(input()) D=int(input()) for k in range(D,0,-1): X=W//(k*k) W-=X print(X)