k = int(input()) dp = [1] * 21 dp[0] = 0 for i in range(2, 21): start = i - 6 if i >= 6 else 0 for j in dp[start:i]: dp[i] += j / 6 print(dp[k])