import scipy.special x = int(input()) ans = 0 l = [0] for i in range(2, 10000): cur = scipy.special.zeta(i) - 1 ans += cur l.append(l[-1] + cur) if x == 2: print(1000000) else: print(int((ans - l[x - 2]) * 10 ** 6))