N=int(input())
s=1000000
ans=0
if N==2:
  print(s)
  exit()
for i in range(1,s):
    ans+=(1/i)*((i+1)**(-(N-1)))
print(int(ans*s))