#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#define MAX 1000000000000000000
int main() {
	int n;
	unsigned long long int a[100000];
	unsigned long long int ans = 1;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%lld", &(a[i]));
		ans *= a[i];
	}
	if (ans <= MAX) {
		ans = -1;

	}
	
	    printf("%d\n",ans);

	return 0;
}