//package Contest169;


import java.util.*;
import java.io.*;
import java.math.*;

import java.math.*;
class Main {
    public static void main(String args[] ) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        //Start here:
        //System.out.println(Long.MAX_VALUE);
        //.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        
        Scanner sc=new Scanner(System.in);
        
        int t=sc.nextInt();
        
        long a[]=new long[t];
        
        
        for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        }
        
        //BigInteger b=new BigInteger("1000000000000000000");
        //9223372036854775807
        //1000000000000000000
        //BigInteger ans=BigInteger.ONE;
        long max=1000000000000000000L;
        long ans=1L;
        boolean flag=true;
        Arrays.sort(a);
        //System.out.println(Long.MAX_VALUE);
        //System.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        }
        System.out.println(ans);
  

    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java import java.math.*; math.* java class Main {
    public static void main(String args[] ) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        //Start here:
        //System.out.println(Long.MAX_VALUE);
        //.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        
        Scanner sc=new Scanner(System.in);
        
        int t=sc.nextInt();
        
        long a[]=new long[t];
        
        
        for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        }
        
        //BigInteger b=new BigInteger("1000000000000000000");
        //9223372036854775807
        //1000000000000000000
        //BigInteger ans=BigInteger.ONE;
        long max=1000000000000000000L;
        long ans=1L;
        boolean flag=true;
        Arrays.sort(a);
        //System.out.println(Long.MAX_VALUE);
        //System.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        }
        System.out.println(ans);
  

    }
} Main public static void main(String args[] ) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        //Start here:
        //System.out.println(Long.MAX_VALUE);
        //.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        
        Scanner sc=new Scanner(System.in);
        
        int t=sc.nextInt();
        
        long a[]=new long[t];
        
        
        for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        }
        
        //BigInteger b=new BigInteger("1000000000000000000");
        //9223372036854775807
        //1000000000000000000
        //BigInteger ans=BigInteger.ONE;
        long max=1000000000000000000L;
        long ans=1L;
        boolean flag=true;
        Arrays.sort(a);
        //System.out.println(Long.MAX_VALUE);
        //System.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        }
        System.out.println(ans);
  

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        //Start here:
        //System.out.println(Long.MAX_VALUE);
        //.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        
        Scanner sc=new Scanner(System.in);
        
        int t=sc.nextInt();
        
        long a[]=new long[t];
        
        
        for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        }
        
        //BigInteger b=new BigInteger("1000000000000000000");
        //9223372036854775807
        //1000000000000000000
        //BigInteger ans=BigInteger.ONE;
        long max=1000000000000000000L;
        long ans=1L;
        boolean flag=true;
        Arrays.sort(a);
        //System.out.println(Long.MAX_VALUE);
        //System.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        }
        System.out.println(ans);
  

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int t=sc.nextInt(); t sc.nextInt() sc.nextInt sc long a[]=new long[t]; a new long[t] t for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        } int i=0; int i=0; i 0 i<t i t i++ i++ i {
        	a[i]=sc.nextLong();
        } {
        	a[i]=sc.nextLong();
        } a[i]=sc.nextLong() a[i] a i sc.nextLong() sc.nextLong sc long max=1000000000000000000L; max 1000000000000000000L long ans=1L; ans 1L boolean flag=true; flag true Arrays.sort(a) Arrays.sort Arrays a for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        } int i=0; int i=0; i 0 i<t i t i++ i++ i {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        } {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        } if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	} a[i]==0 a[i] a i 0 {
        		System.out.println(0);
        		return;
        	} System.out.println(0) System.out.println System.out System System.out 0 return; if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	} ans>Long.MAX_VALUE/a[i] ans Long.MAX_VALUE/a[i] Long.MAX_VALUE Long Long.MAX_VALUE a[i] a i {
        		System.out.println(-1);
        		return;
        	} System.out.println(-1) System.out.println System.out System System.out -1 1 return; ans=(long)ans*a[i] ans (long)ans*a[i] (long)ans a[i] a i if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	} ans==0 ans 0 {
        		System.out.println(0);
        		return;
        	} System.out.println(0) System.out.println System.out System System.out 0 return; if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	} ans>max ans max {
        		System.out.println(-1);
        		return;
        	} System.out.println(-1) System.out.println System.out System System.out -1 1 return; System.out.println(ans) System.out.println System.out System System.out ans String args[] args
//package Contest169;


import java.util.*;
import java.io.*;
import java.math.*;

import java.math.*;
class Main {
    public static void main(String args[] ) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        //Start here:
        //System.out.println(Long.MAX_VALUE);
        //.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        
        Scanner sc=new Scanner(System.in);
        
        int t=sc.nextInt();
        
        long a[]=new long[t];
        
        
        for(int i=0;i<t;i++)
        {
        	a[i]=sc.nextLong();
        }
        
        //BigInteger b=new BigInteger("1000000000000000000");
        //9223372036854775807
        //1000000000000000000
        //BigInteger ans=BigInteger.ONE;
        long max=1000000000000000000L;
        long ans=1L;
        boolean flag=true;
        Arrays.sort(a);
        //System.out.println(Long.MAX_VALUE);
        //System.out.println(Integer.MAX_VALUE);
        //System.out.println("Hello");
        for(int i=0;i<t;i++)
        {
        	if(a[i]==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>Long.MAX_VALUE/a[i])
        	{
        		System.out.println(-1);
        		return;
        	}
        	ans=(long)ans*a[i];
        	
        	if(ans==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans>max)
        	{
        		System.out.println(-1);
        		return;
        	}
        	/*
        	BigInteger bb=new BigInteger(Long.toString(a[i]));
        	
        	//System.out.println(ans);
        	ans=ans.multiply(bb);
        	
        	if(ans.compareTo(BigInteger.ZERO)==0)
        	{
        		System.out.println(0);
        		return;
        	}
        	if(ans.compareTo(BigInteger.ZERO)<0)
        	{
        		System.out.println(-1);
        		return;
        	}*/
        }
        System.out.println(ans);
  

    }
}