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