import sys input = sys.stdin.readline def zeta(n): res = 0 for i in range(1, 1000): res += 1/i**n return res*10**6 ans = 0 x = int(input()) for i in range(x, x+300): ans += zeta(i)-10**6 print(int(ans))