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