k=int(input()) dp=[0]*(k+6) for i in range(6,k+6): dp[i]=sum(dp[i-6:i])/6+1 print(dp[k+5])