m = int(input()) S = [float(input()) for _ in range(1 << m)] def P(i, j): a = S[i] ** 2 b = S[j] ** 2 return a / (a + b) dp = [1.0] * (1 << m) for i in range(m): ndp = [0.0] * (1 << m) x = 0 d = 1 << i while x < (1 << m): L = list(range(x, x + d)) x += d R = list(range(x, x + d)) x += d for l in L: for r in R: ndp[l] += dp[l] * dp[r] * P(l, r) ndp[r] += dp[l] * dp[r] * P(r, l) dp = ndp print(dp[0])