#include <stdio.h>
int main()
{
	int N;
	int risolt=1;
	scanf ("%d",&N);
	int A[N];
	for (int i=0;i<N;i++)
	{
		scanf ("%d",&A[N]);
		risolt*=A[N];
	}
	risolt <=1000000000000000000 ? printf ("%d \n",risolt) : printf ("-1\n");
}