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) print(int((ans - l[x - 2]) * 10 ** 6))