#include <stdio.h>

int main(){
    int n,i;
     long long a[100000],c=1;
    scanf("%d", &n);
  
for (i = 0;i < n;i++){
        if (A[i] == 0){
            printf("0");
            return 0;
        }
    }

 for(i=0; i<n; i++){
  scanf("%lld",a[i]);
      c=c*a[i];}
for (i = 0;i < n;i++){
if(a[i]>1000000000000000000){
   printf("-1\n");
            return 0;}
    c*=a[i];}
    
    printf("%lld\n",c);
    
    return 0;
}
