#include <bits/stdc++.h>

using namespace std;

vector<double> v;
double dp[3002][3002];
bool visitado[3002][3002];


double coin(int posicao, int n_head)
{

	double soma = 0.00;


	if(n_head > v.size() - n_head)
	{
		return 1.00;
	}

	if(posicao >= v.size())
	{

		return 0.00;
	}

	if(visitado[posicao][n_head])
		return dp[posicao][n_head];

	visitado[posicao][n_head] = true;


	soma += v[posicao] * coin(posicao + 1, n_head + 1);
	soma += (1.00 - v[posicao]) * coin(posicao + 1, n_head);


	return dp[posicao][n_head] = soma;



}





int main()
{

	int n;
	double real;

	cin >> n;

	for (int i = 0; i < n; ++i)
	{
		cin >> real;
		v.push_back(real);
	}

	real = coin(0, 0);


	cout << fixed << setprecision(10) << real << endl;




	return 0;
}