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



}
