#include <stdio.h>
#include <stdlib.h>

int main(void){
	long int n, a, b=0;
	int i;
	puts("How many number?");
	scanf("%ld",&n);
	puts("plz enter numbre");
	scanf("%ld",&b);
	for(i=1;i<n;i++){
		scanf("%ld",&a);
		b *= a;
		if(b>1000000000000000000){
			printf("-1");
			return 0;
		}
	}
	printf("%ld",b);
	return 0;
}