import math from decimal import Decimal, getcontext # Set a high precision to handle large exponents accurately getcontext().prec = 1000 n = int(input()) sum_p = Decimal(0) for k in range(0, 7): comb = math.comb(6, k) sign = (-1) ** k term = Decimal(comb) * Decimal(sign) * (Decimal(6 - k) / Decimal(6)) ** n sum_p += term # Format the output to print up to 12 decimal places, trailing zeros may be omitted print("{0:.12f}".format(sum_p))