import math x=int(input()) if x==2: print(989898) exit(0) 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))