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