#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, i, j, x;
  cin >> n;
  vector<double> p(n + 1);
  double prod_head[n + 1];
  double prod_tail[n + 1];
  prod_head[0] = 1;
  prod_tail[0] = 1;
  for (i = 1; i <= n; i++) {
    cin >> p[i];
    prod_head[i] = (p[i] * prod_head[i - 1]);
    prod_tail[i] = ((1 - p[i]) * prod_tail[i - 1]);
  }
  double dp_head[n + 1][n + 1];
  dp_head[0][0] = 1;
  for (i = 1; i <= n; i++) {
    for (x = 0; x <= min(n, i); x++) {
      if (x == 0) {
        dp_head[x][i] = prod_tail[i];
        continue;
      }
      dp_head[x][i] = (dp_head[x - 1][i - 1] * p[i]);
      if (x <= i - 1) {
        dp_head[x][i] += dp_head[x][i - 1] * (1 - p[i]);
      }
    }
  }
  double sum = 0.0;
  for (i = n / 2 + 1; i <= n; i++) {
    sum += dp_head[i][n];
  }
  cout << sum << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
