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

int main(void)
{
	int n, i;
	long double a, b, result = 1;

	//input
	scanf("%d", &n);
	
	for (i = 0;i < n;i++) {
		scanf("%lf", &a);
		result *= a;

		
		//printf("%.0f\n", result);

	}
	//result = a * b;
	if (result >= pow(10, 18))
	{
		printf("-1");
		return 0;
	}
	//output
	printf("%.0f",result);
	return 0;
}