#include<stdio.h>
signed main(){

int i,n,answer=1;
int a[100]; 
scanf("%d",&n);

for(i=0;i<=n;i++){

scanf("%d",&a[i]);
answer*=a[i];
}
if(answer<1000000000000000000){
printf("%d\n",answer);
}else{
printf("-1\n");    
}



return(0);
}