import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;}
	}}
	
 import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;}
	}} Main public static void main (String[] args) throws java.lang.Exception
	{try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;}
	} main {try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;}
	} try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;} catch(Exception e) {
	return;} Exception e {
	return;} return; {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}} Scanner k=new Scanner(System.in); k new Scanner(System.in) int n=k.nextInt(); n k.nextInt() k.nextInt k int kg=0; kg 0 BigInteger f=new BigInteger("1"); f new BigInteger("1") BigInteger ff=new BigInteger("1000000000000000000"); ff new BigInteger("1000000000000000000") long ar[]=new long[n]; ar new long[n] n for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
		    ar[i]=k.nextLong();
		    
		} {
		    ar[i]=k.nextLong();
		    
		} ar[i]=k.nextLong() ar[i] ar i k.nextLong() k.nextLong k for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }} int i=0; int i=0; i 0 i<n i n i++ i++ i {
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }} {
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }} if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    } ar[i]==0 ar[i] ar i 0 {
		        System.out.print(0);kg=99;
		        break;
		    } System.out.print(0) System.out.print System.out System System.out 0 kg=99 kg 99 break; if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);} kg==0 kg 0 {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);} for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		} {
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		} f=f.multiply(BigInteger.valueOf(ar[i])) f f.multiply(BigInteger.valueOf(ar[i])) f.multiply f BigInteger.valueOf(ar[i]) BigInteger.valueOf BigInteger ar[i] ar i if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;} f.compareTo(ff)==1 && kg==0 f.compareTo(ff)==1 f.compareTo(ff) f.compareTo f ff 1 kg==0 kg 0 {
		    System.out.print("-1");kg=99;
		break;} System.out.print("-1") System.out.print System.out System System.out "-1" kg=99 kg 99 break; if(kg==0)
			System.out.print(f); kg==0 kg 0 System.out.print(f) System.out.print System.out System System.out f String[] args args
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.BigInteger;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{try {
	    
	
	    Scanner k=new Scanner(System.in);
		int n=k.nextInt();int kg=0;
		BigInteger f=new BigInteger("1");	
		BigInteger ff=new BigInteger("1000000000000000000");
		long ar[]=new long[n];
		for(int i=0;i<n;i++)
		{
		    ar[i]=k.nextLong();
		    
		}
		for(int i=0;i<n;i++)
		{
		    if(ar[i]==0)
		    {
		        System.out.print(0);kg=99;
		        break;
		    }}
		    if(kg==0)
		  {  for(int i=0;i<n;i++)
		{
		    f=f.multiply(BigInteger.valueOf(ar[i]));
		    if(f.compareTo(ff)==1 && kg==0)
		{
		    System.out.print("-1");kg=99;
		break;}
		}
		if(kg==0)
			System.out.print(f);}}
			catch(Exception e) {
	return;}
	}}
	

