import math def dfs(s, n): ret = [0.0] * n if n == 1: ret[0] = 1 return ret a = dfs(s, n // 2) b = dfs(s + n // 2, n // 2) for i in range(len(a)): for j in range(len(b)): p = a[i] * b[j] ap = s + i bp = s + n // 2 + j ret[i] += p * params[ap] * params[ap] / (params[ap] * params[ap] + params[bp] * params[bp]) ret[n // 2 + j] += p * params[bp] * params[bp] / (params[ap] * params[ap] + params[bp] * params[bp]) return ret M = int(input()) mem = int(math.pow(2, M)) params = [] for _ in range(mem): params.append(int(input())) ans = dfs(0, mem) print(ans[0])