import math x=int(input()) ans=0 for i in range(2,1000000): if pow(i,x-1)*(i-1)>1000000000000000000: break A=pow(i,x-1)*(i-1) ans+=1/A ans*=1000000 print(math.floor(ans))