#include <bits/stdc++.h>
using namespace std;
double dp[3005], ans;
int main() {
  long long int n, i, j;
  cin >> n;
  double p[n + 1];
  for (i = 1; i <= n; ++i) {
    cin >> p[i];
  }
  dp[0] = 1;
  for (i = 1; i <= n; ++i) {
    for (j = i; j >= 0; --j)
      if (j)
        dp[j] = dp[j - 1] * p[i] + dp[j] * (1 - p[i]);
      else
        dp[j] = dp[j] * (1 - p[i]);
  }
  for (i = 1; i <= n; ++i) {
    if (i > n - i) ans += dp[i];
  }
  cout << fixed << setprecision(10) << ans;
  return 0;
}
