import sys def input(): return sys.stdin.readline().rstrip() def main(): K = int(input()) ok = 0 ng = K*6 def solve(x): arr = [x] * 5 + [0] for i in range(K): arr = arr[1:] + [1 + sum(arr) / 6] return arr[-1] > x while abs(ok-ng) / max(1, ok, ng) > 1e-12: mi = (ok+ng)/2 if solve(mi): ok = mi else: ng = mi print((ok+ng)/2) if __name__ == '__main__': main()