#include <stdio.h>
#include <stdint.h>
#include <math.h>
 
int main()
{
    int N;
    scanf("%d", &N);
    long double A[N],result=1;
    for (long long i = 0; i < N; i++)
    {
        scanf("%Le", &A[i]);
        if (A[i]==0){
            printf("0");
            return 0;
        }
    }
    for (long long i = 0; i < N; i++){
        result *=A[i];
        if(result > 1000000000000000000){
            result=-1;
            break;
        }
    }
    printf("%Lf", result);
    return 0;
}