import sys input = sys.stdin.readline def zeta(n): res = 0 for i in range(1, 1000): if i**n > 10**20: break res += 10**6/i**n return res ans = 0 x = int(input()) for i in range(x, x+300): ans += zeta(i) ans = str(ans).split(".")[0] print(ans[3:])