from decimal import Decimal, getcontext getcontext().prec = 1000 # Set high precision to handle very small numbers accurately n = int(input()) if n == 0: value = Decimal('4.00000000') else: numerator = 3 ** n denominator = 4 ** (n - 1) value = Decimal(numerator) / Decimal(denominator) # Format the output to exactly 8 decimal places formatted_value = format(value, '.8f') print(formatted_value)