m = int(input()) s = [int(input()) for _ in range(1 << m)] dp = [1] * (1 << m) for i in range(m): dp = [dp[j] * sum(dp[j ^ x ^ 1 << i] * s[j] ** 2 / (s[j] ** 2 + s[j ^ x ^ 1 << i] ** 2) for x in range(1 << i)) for j in range(1 << m)] print(dp[0])