#include<stdio.h>
#define N 100000

int main(void)
{
    int i,n,a[N],sum=1;

    if(scanf("%d",&n)==1)
        printf("%d",n);
        
    for(i=0;i<n;i++){
        if(scanf("%d",&a[i])==1)
            sum*=a[i];
    }

    if(sum<1000000000000000000)
        printf("%d\n",sum);
    else
    {
        printf("-1\n");
    }

    return 0;
}