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