intN;   
    cin >> N;   
 
    vector<double> p(N);
    for(inti = 0; i < N; i++)
    {
        cin >> p[i];
    }
    vector<double> p100(100);
    for(inti = 0; i < 100; i++)
    {
        intindex = i % N;
        p100[i] = p[index];
    }
 
    doublesum = 0.0;
    doublepre = 1.0;
    for(inti = 0; i < 50; i+=2)
    {
        sum += pre * p100[i];
        pre *= ((1.0 - p100[i]) * (1.0 - p100[i + 1]));
    }
 
    printf("%.4f\n", sum);