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