k=input() eps=1e-2 l=0.0 r=1e9 p=[0]*(k+1) while abs(l-r)>eps: c=(l+r)/2 for i in range(1,k+1): p[i]= 1+sum([p[j] if j>=0 else c for j in range(i-6,i)])/6 if p[k]>=c: l=c else: r=c print (l+r)/2