import mpmath x = int(input()) if x >= 50: print(0) exit() ans_ = 1 for i in range(2,x): ans_ -= mpmath.zeta(i,1)-1 print(int(ans_*10**6))