def main(): # DP[i]・・・今までの和がiで、あと何回振らなきゃいけないか #にぶたんばーじょん k = int(input()) dp = [0] * (k + 1) roop = 20 l = 0 r = k + 6 for _ in range(roop): m=(l+r)/2 dp[0]=m for i in range(k - 1, -1, -1): dp[i] = sum(dp[i + j] if i + j <= k else dp[0] for j in range(1, 7)) / 6 + 1 if dp[0]>m:l=m else:r=m print(l) main()