#include <stdio.h>
#include <math.h>

int main(void)
{
	int i,n;
	unsigned long double threshold,mult=1,temp;

	scanf("%d",&n);

	threshold = pow(10,18);

	for(i=0;i<n;i++){
		scanf("%.0Lf",&temp);
		mult *= temp;
	}

	if(mult > threshold){
		mult =-1;
	}
	printf("%.0Lf\n",mult);

	return 0;
}

