w = int(input()) d = int(input()) for i in range(d, 0, -1): t = int(w/(i**2)) #print(d, t) w -= t print(t)