import java.util.*;
public class Main {	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	}
	
	public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	}
} import java.util.*; util.* java public class Main {	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	}
	
	public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	} main {
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int aa = sc.nextInt(); aa sc.nextInt() sc.nextInt sc double x[] = new double[aa]; x new double[aa] aa for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		} int n = 0; int n = 0; n 0 n < aa n aa n++ n++ n {
			x[n] = sc.nextInt();
		} {
			x[n] = sc.nextInt();
		} x[n] = sc.nextInt() x[n] x n sc.nextInt() sc.nextInt sc double a = 1; a 1 double b = x[0]; b x[0] x 0 for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		} int n=1; int n=1; n 1 n < aa n aa n++ n++ n {
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		} {
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		} a = a*x[n] + b a a*x[n] + b a*x[n] a x[n] x n b b *= x[n] b x[n] x n double t = f(Math.max(a, b), Math.min(a, b)); t f(Math.max(a, b), Math.min(a, b)) f Math.max(a, b) Math.max Math a b Math.min(a, b) Math.min Math a b a = a / t a a / t a t b = b / t b b / t b t System.out.println((double)b/(double)a) System.out.println System.out System System.out (double)b/(double)a (double)b (double)a String args[] args public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	} f {
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	} double t = d % e; t d % e d e if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t); t == 1 t 1 return 1; 1 if(t == 0)return e;
		else return f(e, t); t == 0 t 0 return e; e return f(e, t); f(e, t) f e t double d d double e e public class Main {	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	}
	
	public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	}
} public class Main {	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	}
	
	public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	}
} Main
import java.util.*;
public class Main {	
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int aa = sc.nextInt();
		double x[] = new double[aa];
		for(int n = 0; n < aa; n++){
			x[n] = sc.nextInt();
		}
		double a = 1;
		double b = x[0];
		for(int n=1; n < aa; n++){
			a = a*x[n] + b;
			b *= x[n];
			double t = f(Math.max(a, b), Math.min(a, b));
			a = a / t;
			b = b / t;
		}
		System.out.println((double)b/(double)a);
		
		
	}
	
	public static double f(double d, double e){
		double t = d % e;
		if(t == 1)return 1;
		else if(t == 0)return e;
		else return f(e, t);
	}
}