K = int(input()) dp = [0] * 6 for i in range(K): x = 0 for j in range(1, 7): x += dp[-j] * (1 / 6) x += 1 dp.append(x) print(dp[-1])