#include<stdio.h>

int main()
{
    long int A,n,mul=1;

    if(n>1 && n<1000000000000000)
    {
        scanf("%ld",&n);

    while(n--)
    {
         scanf("%ld",&A);
        mul=mul*A;
    }

    if(mul>1000000000000000000)
        printf("-1\n");
    else
        printf("%ld\n",mul);
    }


    return 0;
}
