#include<stdio.h>
int main()
{
    long long int i,a, b,sum=1;
scanf("%lld",&a);
if(a>=2)
 {while(a--)
 {
  scanf("%lld",&b);
    sum=sum*b;

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

}}
