#include <bits/stdc++.h>
using namespace std;
double p[200];
double s[200];
double ans[200][200];
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%lf", &p[i]);
  sort(p, p + n);
  memset(ans, 0, sizeof(ans));
  double r = 0;
  for (i = 0; i < n; i++) {
    s[i] = 1;
    for (j = i - 1; j >= 0; j--) s[j] = s[j + 1] * (1.0 - p[j]);
    for (j = i + 1; j < n; j++) s[j] = s[j - 1] * (1.0 - p[j]);
    for (j = 0; j <= i; j++)
      for (k = i; k < n; k++) {
        double now = s[j] * s[k] * p[i];
        ans[j][k] += now;
      }
  }
  for (i = 0; i < n; i++)
    for (j = i; j < n; j++) r = max(r, ans[i][j]);
  printf("%.11lf\n", r);
  return 0;
}
