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

int main(void) {
	
	int N;
	scanf("%d", &N);
	int i, multi;
	multi = 1;
	int array[N];
	if(2<=N && N<=pow(10,5))
	{
		for(i=0;i<N;i++){
			scanf("%d",&array[i]);
			multi = multi * array[i];
		}
		if(0<=multi && multi <=pow(10,18)) printf("%d", multi);
		else printf("-1");
	}
	else printf("No!");
	return 0;
}