W = int(input()) D = int(input()) for I in range(D, 1, -1): W -= W // (I ** 2) print(W)