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