//package MyJavaProject;
 
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException; 
import java.io.InputStreamReader;
import java.lang.Math;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.io.*;
import java.math.BigInteger; 
import java.io.PrintWriter;  

public class Main 
{
	static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	
	
	static void print(String s)
	{
		System.out.print(s);
	}
	static void print(boolean s)
	{
		System.out.print(s);
	}
	static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } 
	public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	}
}
	

	
	

	
	
	
	
	
	
	
	 import java.util.*; util.* java import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.Math; Math java.lang import java.util.concurrent.TimeUnit; TimeUnit java.util.concurrent import java.util.stream.Collectors; Collectors java.util.stream import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.io.PrintWriter; PrintWriter java.io public class Main 
{
	static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	
	
	static void print(String s)
	{
		System.out.print(s);
	}
	static void print(boolean s)
	{
		System.out.print(s);
	}
	static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } 
	public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	}
} Main static void print(String s)
	{
		System.out.print(s);
	} print {
		System.out.print(s);
	} System.out.print(s) System.out.print System.out System System.out s String s s static void print(boolean s)
	{
		System.out.print(s);
	} print {
		System.out.print(s);
	} System.out.print(s) System.out.print System.out System System.out s boolean s s static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } isOverflow { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } if (a == 0 || b == 0)  
            return false; a == 0 || b == 0 a == 0 a 0 b == 0 b 0 return false; false long result = a * b; result a * b a b if (a == result / b) 
            return false; 
        else
            return true; a == result / b a result / b result b return false; false return true; true long a a long b b public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	} main {
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	} FastReader f=new FastReader(); f new FastReader() BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out)); w new BufferedWriter(new OutputStreamWriter(System.out)) int n; n n=f.nextInt() n f.nextInt() f.nextInt f long a[]=new long[n]; a new long[n] n for(int i=0;i<n;i++)
				a[i]=f.nextLong(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=f.nextLong(); a[i]=f.nextLong() a[i] a i f.nextLong() f.nextLong f long p=1; p 1 int c=0; c 0 Arrays.sort(a) Arrays.sort Arrays a if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            } a[0]==0 a[0] a 0 0 {
              System.out.println(0);
              System.exit(0);
            } System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			} int i=0; int i=0; i 0 i<n i n i++ i++ i {
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			} {
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			} if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				} isOverflow(p,a[i]) isOverflow p a[i] a i {
					System.out.println(-1);
					System.exit(0);
				} System.out.println(-1) System.out.println System.out System System.out -1 1 System.exit(0) System.exit System 0 p*=a[i] p a[i] a i if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p); p>(long)(Math.pow(100, 9)) p (long)(Math.pow(100, 9)) Math.pow Math 100 9 {	System.out.println(-1);
			
			} System.out.println(-1) System.out.println System.out System System.out -1 1 System.out.println(p) System.out.println System.out System System.out p String args[] args static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } FastReader { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } br = new BufferedReader(new
	                     InputStreamReader(System.in)) br new BufferedReader(new
	                     InputStreamReader(System.in)) String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } next { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } IOException  e { 
	                    e.printStackTrace(); 
	                } e.printStackTrace() e.printStackTrace e { 
	                    st = new StringTokenizer(br.readLine()); 
	                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } nextInt { 
	            return Integer.parseInt(next()); 
	        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } nextLong { 
	            return Long.parseLong(next()); 
	        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } nextDouble { 
	            return Double.parseDouble(next()); 
	        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } nextLine { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } String str = ""; str "" try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } IOException e { 
	                e.printStackTrace(); 
	            } e.printStackTrace() e.printStackTrace e { 
	                str = br.readLine(); 
	            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main 
{
	static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	
	
	static void print(String s)
	{
		System.out.print(s);
	}
	static void print(boolean s)
	{
		System.out.print(s);
	}
	static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } 
	public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	}
} public class Main 
{
	static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	
	
	static void print(String s)
	{
		System.out.print(s);
	}
	static void print(boolean s)
	{
		System.out.print(s);
	}
	static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } 
	public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	}
} Main
//package MyJavaProject;
 
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException; 
import java.io.InputStreamReader;
import java.lang.Math;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.io.*;
import java.math.BigInteger; 
import java.io.PrintWriter;  

public class Main 
{
	static class FastReader 

	    { 
	        BufferedReader br; 
	        StringTokenizer st; 
	  
	        public FastReader() 
	        { 
	            br = new BufferedReader(new
	                     InputStreamReader(System.in)); 
	        } 
	  
	        String next() 
	        { 
	            while (st == null || !st.hasMoreElements()) 
	            { 
	                try
	                { 
	                    st = new StringTokenizer(br.readLine()); 
	                } 
	                catch (IOException  e) 
	                { 
	                    e.printStackTrace(); 
	                } 
	            } 
	            return st.nextToken(); 
	        } 
	  
	        int nextInt() 
	        { 
	            return Integer.parseInt(next()); 
	        } 
	  
	        long nextLong() 
	        { 
	            return Long.parseLong(next()); 
	        } 
	  
	        double nextDouble() 
	        { 
	            return Double.parseDouble(next()); 
	        } 
	  
	        String nextLine() 
	        { 
	            String str = ""; 
	            try
	            { 
	                str = br.readLine(); 
	            } 
	            catch (IOException e) 
	            { 
	                e.printStackTrace(); 
	            } 
	            return str; 
	        } 
	    }
	
	
	static void print(String s)
	{
		System.out.print(s);
	}
	static void print(boolean s)
	{
		System.out.print(s);
	}
	static Boolean isOverflow( long a, long b) 
    { 
        // Check if either of them is zero 
        if (a == 0 || b == 0)  
            return false; 
      
        long result = a * b; 
        if (a == result / b) 
            return false; 
        else
            return true; 
    } 
	public static void main(String args[]) throws Exception
	{
		FastReader f=new FastReader();
		BufferedWriter w=new BufferedWriter(new OutputStreamWriter(System.out));
		 
		
		
			int n;
			n=f.nextInt();
			long a[]=new long[n];
			for(int i=0;i<n;i++)
				a[i]=f.nextLong();
			long p=1;
			int c=0;
      		Arrays.sort(a);
      		if(a[0]==0)
            {
              System.out.println(0);
              System.exit(0);
            }
			//BigInteger p=new BigInteger("1");
			//BigInteger big=new BigInteger("1000000000000000000");
			for(int i=0;i<n;i++)
			{
				if(isOverflow(p,a[i]))
				{
					System.out.println(-1);
					System.exit(0);
				}
				p*=a[i];
				
					
			}
			
			if(p>(long)(Math.pow(100, 9)))
			{	System.out.println(-1);
			
			}
			else
				
			System.out.println(p);
			
		
	}
}
	

	
	

	
	
	
	
	
	
	
	
