def zeta2(a):
  q=0
  for i in range(1,10):
    q+=1/pow(i,a)
  return q
N=int(input())
print(zeta2(N))