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