// #include using namespace std; #define fi first #define se second #define all(x) x.begin(), x.end() #define lch (o << 1) #define rch (o << 1 | 1) typedef double db; typedef long long ll; typedef unsigned int ui; typedef pair pint; typedef tuple tint; const int N = 10 + 2; const int S = (59049) + 5; const int INF = 0x3f3f3f3f; const ll INF_LL = 0x3f3f3f3f3f3f3f3f; double f[S][2]; bool vst[S][2]; int a[N]; int n; double DFS(int s, int op) { if (vst[s][op]) return f[s][op]; vst[s][op] = 1; vector vec, pos; for (int i = 0, x = s; i < n; i++) { vec.push_back(x % 3); if (x % 3 == 0) pos.push_back(i); x /= 3; } if (pos.empty()) { int sum1 = 0, sum2 = 0; for (int i = 0; i < n; i++) { if (vec[i] == 1) sum1 += a[i]; if (vec[i] == 2) sum2 += a[i]; } if (op == 0) f[s][op] = sum1 > sum2; if (op == 1) f[s][op] = sum2 >= sum1; } else { for (auto i: pos) { double minf = 1; for (auto j: pos) { // get p(i, j) int s1 = s + pow(3, i) * (op + 1); int s2 = s + pow(3, j) * ((op ^ 1) + 1); double pij = (1.0 / a[i]) * (1 - DFS(s1, op ^ 1)) + (1 - 1.0 / a[i]) * (1.0 / a[j]) * DFS(s2, op); pij /= 1 - (1 - 1.0 / a[i]) * (1 - 1.0 / a[j]); minf = min(minf, pij); } f[s][op] = max(f[s][op], minf); } } return f[s][op]; } int main() { ios::sync_with_stdio(0); cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; cout << fixed << setprecision(10) << DFS(0, 0) << endl; return 0; }