k = int(input()) def dfs(tot): if tot >= k: return 0 ret = 0 for i in range(1, 7): ret += (dfs(tot + i) + 1) / 6 return ret print(dfs(0))