from scipy.special import zeta x=int(input()) MAX = pow(10,5) ans = 0 for n in range(x,MAX): temp = zeta(n) - 1 temp *= pow(10,6) ans += temp print(ans)