from scipy.special import zeta x = int(input()) ans = 0 for i in range(x, 10000): ans += zeta(i) - 1 print(int(ans * 10 ** 6))