#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k;
  double maxm, sum, r;
  cin >> n;
  double A[n];
  for (i = 0; i < n; i++) cin >> A[i];
  sort(A, A + n);
  maxm = A[n - 1];
  for (i = n - 1; i >= 0; i--) {
    sum = 0;
    for (j = n - 1; j >= i; j--) {
      r = A[j];
      for (k = n - 1; k >= i; k--) {
        if (k != j) r = r * (double(1.0) - A[k]);
      }
      sum += r;
    }
    if (sum > maxm) maxm = sum;
  }
  cout << setprecision(10) << maxm << endl;
}
