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