import math x=int(input()) ans=0 for j in range(x,3000): tmp=0 for i in range(1,1000000): tmp+=1/(i**j) if i**j>10**17: break tmp=(tmp-1)*(10**6) ans+=tmp if x==2: print(999999) else: print(math.floor(ans))