#include <stdio.h>
#include <math.h>

int main(void) {
	int N,i;
	scanf("%d",&N);
	double b[1][N];
	double a;a=1;
     for(i=0;i<N;i++){
       scanf("%lf",&b[i]);}
    for(i=0;i<N;i++){
       a=a*b[i]; 
    }
    long double powl(long double 10, long double 16);
    if(a>=powl(long double 10, long double 16)
    {printf("-1");}else{printf("%lf",&a);}
    
	return 0;
}