
import java.util.*;
 interface aisatu{
	final String str="こんにちは";
	void mesod();
}

public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	}
}
 import java.util.*; util.* java interface aisatu{
	final String str="こんにちは";
	void mesod();
} aisatu final String str="こんにちは"; str "こんにちは" void mesod(); mesod public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	}
} Main static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	} main {
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc long aa=1L; aa 1L for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		} {
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		} long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			} Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L Math.log10(a)+Math.log10(aa)>18 Math.log10(a)+Math.log10(aa) Math.log10(a) Math.log10 Math a Math.log10(aa) Math.log10 Math aa 18 aa*a>1000000000000000000L aa*a aa a 1000000000000000000L {
			   //1000000000000000000L
				aa=-1;
			} aa=-1 aa -1 1 if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			} a==0 a 0 {
				aa*=0;
			} aa*=0 aa 0 if(aa!=-1){
				aa*=a;
			} aa!=-1 aa -1 1 {
				aa*=a;
			} aa*=a aa a System.out.println(aa) System.out.println System.out System System.out aa String args[] args public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	}
} public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	}
} Main

import java.util.*;
 interface aisatu{
	final String str="こんにちは";
	void mesod();
}

public class Main {
	static public void main(String args[]){
		Scanner sc=new Scanner(System.in);
		
		int n=sc.nextInt();
		long aa=1L;
		for(int i=0;i<n;i++){
			long a=sc.nextLong();
			if(Math.log10(a)+Math.log10(aa)>18||
			aa*a>1000000000000000000L){
			   //1000000000000000000L
				aa=-1;
			}
			else if(a==0){
				aa*=0;
			}
			else if(aa!=-1){
				aa*=a;
			}
		}
		System.out.println(aa);
	}
}

