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