#include<stdio.h>
int main()    
{
    long long tc;
    scanf("%lld",&tc);
    long long input[tc+1];
    long long total = 1;
    int limit = 1;
    if(tc>=2 && tc<=100000){
	
    for(int i = 0;i<tc;i++)
    {
        scanf("%lld",&input[i]);
        total *= input[i];
    }
    total <=1000000000000000000 ? printf("%lld", total):printf("-1");
    
	}
}
