#include int n, a[20]; double dp[1 << 10][401][2]; bool vis[1 << 10][401]; double * solve(int s, int d) { if(vis[s][d + 200]) return dp[s][d + 200]; vis[s][d + 200] = true; double *cdp = dp[s][d + 200]; int rest = 0; for(int i = 0; i < n; ++i) { if(~s & (1 << i)) continue; rest += a[i]; } if(d <= 0 && d + rest <= 0) { cdp[0] = 0.0; cdp[1] = 0.0; return cdp; } if(d > 0 && d - rest > 0) { cdp[0] = 1.0; cdp[1] = 1.0; return cdp; } cdp[0] = cdp[1] = -1.0; for(int i = 0; i < n; ++i) { if(~s & (1 << i)) continue; double x = -1.0, y = -1.0; double aq = a[i]; double u = solve(s ^ (1 << i), d + a[i])[1]; for(int j = 0; j < n; ++j) { if(~s & (1 << j)) continue; double v = solve(s ^ (1 << j), d - a[j])[0]; double ap = a[j]; double cy = ((ap - 1.) / ap / aq * u + 1. / ap * v) / (1. - (ap - 1.) / ap * (aq - 1.) / aq); double cx = ((aq - 1.) / aq / ap * v + 1. / aq * u) / (1. - (aq - 1.) / aq * (ap - 1.) / ap); if(y < 0.0 || cy < y || (fabs(cy - y) < 1e-5 && cx < x)) { x = cx; y = cy; } } if(cdp[0] < 0.0 || x > cdp[0] || (fabs(x - cdp[0]) < 1e-5 && y > cdp[1])) { cdp[0] = x; cdp[1] = y; } } return cdp; } int main() { scanf("%d", &n); for(int i = 0; i < n; ++i) { scanf("%d", a + i); } printf("%.12f\n", solve((1 << n) - 1, 0)[0]); return 0; }