W = int(input()) D = int(input()) ans = 0 current_d = D for _ in range(D): ans = W // (current_d ** 2) W -= ans current_d -= 1 print(ans)