#include<stdio.h>
 
int main(){
  int N;
  int A[N];
  int i,j,h;
  while(scanf("%d",&N)==0);
  int K=1;
  
  for(i=0;i<N;i++){
    while(scanf("%d",&A[i])==0);
  } 
  
  for(i=0;i<N;i++){
    for(j=i+1;j<N;j++){
      if(A[i]<A[j]){
        h=A[i];
        A[i]=A[j];
        A[j]=h;
      }
    }
  }
    A[N]='\n';
  
    
  for(i=0;i<N;i++){  
      if((K*A[i])>1000000000000000000){
    K=-1;
        break;
      }
  else if(A[i-1]==0){
    K=0;
    break;
  }else
    K=K*A[i];
  }
  

printf("%d\n",K);
  
  return 0;
}