#include <stdio.h>
int main()
{
	long long int n, m = 1, a, b;
	scanf("%lld", &n);
	while (n--)
	{
		scanf("%lld", &a);
		m *= a;
	}
	if (m <= 1000000000000000000)

		printf("%lld\n", m);
	else
		printf("-1\n");
	return 0;
}