// Java program to find large factorials using BigInteger 
import java.math.BigInteger; 
import java.util.Scanner; 

public class Main
{

	// Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} 
}  import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main
{

	// Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} 
} Main // Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} main { 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc BigInteger [] a = new BigInteger[N]; a new BigInteger[N] N String MX = "1000000000000000000"; MX "1000000000000000000" for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        } {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        } String str = sc.next(); str sc.next() sc.next sc a[i]=new BigInteger(str) a[i] a i new BigInteger(str) if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            } a[i].compareTo(new BigInteger("0"))==0 a[i].compareTo(new BigInteger("0")) a[i].compareTo a[i] a i new BigInteger("0") 0 {
                System.out.println("0");
                return ;
            } System.out.println("0") System.out.println System.out System System.out "0" return ; BigInteger f= a[0]; f a[0] a 0 for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        } int i=1; int i=1; i 1 i<N i N i++ i++ i {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        } {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        } f=f.multiply(a[i]) f f.multiply(a[i]) f.multiply f a[i] a i if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            } f.compareTo(new BigInteger(MX))==1 f.compareTo(new BigInteger(MX)) f.compareTo f new BigInteger(MX) 1 {
                System.out.println("-1");
                return ;
            } System.out.println("-1") System.out.println System.out System System.out "-1" return ; System.out.println(f) System.out.println System.out System System.out f String args[] args public class Main
{

	// Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} 
} public class Main
{

	// Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} 
} Main
// Java program to find large factorials using BigInteger 
import java.math.BigInteger; 
import java.util.Scanner; 

public class Main
{

	// Driver method 
	public static void main(String args[]) throws Exception 
	{ 
    	Scanner sc=new Scanner(System.in);
		int N = sc.nextInt();
        BigInteger [] a = new BigInteger[N];
        String MX = "1000000000000000000";
        for(int i=0;i<N;i++)
        {
            String str = sc.next();
            a[i]=new BigInteger(str); 
            if(a[i].compareTo(new BigInteger("0"))==0)
            {
                System.out.println("0");
                return ;
            }
        }
        BigInteger f= a[0];
        for(int i=1;i<N;i++)
        {
            f=f.multiply(a[i]);
            if(f.compareTo(new BigInteger(MX))==1)
            {
                System.out.println("-1");
                return ;
            }
        }
		System.out.println(f); 
	} 
} 
