#include "stdio.h"

int main(void)
{
    int su;
    scanf("%d",&su);

    long int A[su];
    long int kei=1;
    long int i;
    int no = -1;

    for(i=0;i<su;i++)
    {
        scanf("%ld",&A[i]);
        kei = kei*A[i];
    }

    if(kei >= 1000000000000000000)
    {
        printf("%d",no);
    }
    else
    {
        printf("%ld",kei);
    }
    
}