// Arup Guha
// 3/5/2022
// Solution to 2021 SER D1/D2 Problem: Black and White

import java.util.*;

public class blackwhite {

	public static int n;
	public static double[] p;
	
	public static void main(String[] args) {
	
		// Read in the probabilities.
		Scanner stdin = new Scanner(System.in);
		n = stdin.nextInt();
		p = new double[n];
		for (int i=0; i<n; i++)
			p[i] = stdin.nextDouble();
	
		double[] dp = new double[1<<n];
		
		// Go through each mask.
		for (int i=3; i<(1<<n); i++) {
		
			int bits = Integer.bitCount(i);
			if (bits <= 2) continue;
			
			// Pre-comp probabilities for all on, or all off.
			double allOn = 1;
			double allOff = 1;
			for (int j=0; j<n; j++) {
				if ((i & (1<<j)) != 0) {
					allOn *= p[j];
					allOff *= (1-p[j]);
				}
			}	
			
			// Accumulators helpful for our sum.
			double mySum = 0;
			double totalP = 0;
			
			// Try turning off bit j.
			for (int j=0; j<n; j++) {
			
				// Skip it, j isn't on.
				if ((i & (1<<j)) == 0) continue;
				
				// Previous mask.
				int prev = i - (1<<j);
				
				// Probability j is eliminated from state i.
				double thisP = allOn*(1-p[j])/p[j] + allOff*p[j]/(1-p[j]);
				totalP += thisP;
				
				// Add this into our sum
				mySum += (thisP*(dp[prev]+1));
			}
			
			// Set up a formula for dp[i] and you have to add this in to the numerator.
			mySum += (1-totalP);
			
			// We have to solve and equation for dp[i], and this is the solution.
			dp[i] = mySum/totalP;
		}
		
		// Ta da!
		System.out.println(dp[(1<<n)-1]);
	}
}