#include using namespace std; int main(void) { cout << fixed << setprecision(20); int M; cin >> M; vector S(1 << M); for(int i = 0; i < (1 << M); ++i) cin >> S[i]; auto calc = [&](int i, int j) ->double { return (S[i] * S[i]) / (S[i] * S[i] + S[j] * S[j]); }; vector c(1 << M, 1); auto dfs = [&](auto &&dfs, int t, int s) ->void { if(t == -1) return; dfs(dfs, t - 1, s); dfs(dfs, t - 1, s + (1 << t)); vector nc(1 << (t + 1), 0); for(int i = 0; i < (1 << t); ++i) for(int j = (1 << t); j < (1 << (t + 1)); ++j) { nc[i] += c[s + j] * calc(s + i, s + j); nc[j] += c[s + i] * calc(s + j, s + i); } for(int i = 0; i < (1 << (t + 1)); ++i) c[s + i] *= nc[i]; }; dfs(dfs, M - 1, 0); cout << c[0] << "\n"; return 0; }