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