#include  <stdio.h>

int main(void)
{
   long long int a,b=1,c=1,d;
    scanf("%lld",&a);
    
    if(a<=1||a>100000)
        return 0;
    
    while(b<=a)
    {
        scanf("%lld",&d);
        
        c=c*d;
        if(d==0)
        {
            printf("0");
            return 0;
        }
        else if(d<0)
            return 0;
         b++;
    }
    if(c>1000000000000000000||c<=0)
        c= -1;
   
    
    printf("%lld",c);
    return 0;
}