import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

	public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	}


} import java.math.BigInteger; BigInteger java.math import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	}


} Main public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	} main {
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	} Scanner input=new Scanner(System.in); input new Scanner(System.in) int n n f=0; f 0 BigInteger a[]=new BigInteger[100005]; a new BigInteger[100005] 100005 n=input.nextInt() n input.nextInt() input.nextInt input BigInteger b=new BigInteger("1"); b new BigInteger("1") BigInteger c=new BigInteger("1000000000000000000"); c new BigInteger("1000000000000000000") BigInteger d=new BigInteger("0"); d new BigInteger("0") for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		} {
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		} a[i]=input.nextBigInteger() a[i] a i input.nextBigInteger() input.nextBigInteger input if(a[i].equals(d)){
				f=2;
				break;
			} a[i].equals(d) a[i].equals a[i] a i d {
				f=2;
				break;
			} f=2 f 2 break; if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		} f==2 f 2 {
			System.out.println("0");
		} System.out.println("0") System.out.println System.out System System.out "0" {
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		} for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			} {
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			} b=b.multiply(a[i]) b b.multiply(a[i]) b.multiply b a[i] a i if(b.compareTo(c)>0){
					f=1;
					break;
				} b.compareTo(c)>0 b.compareTo(c) b.compareTo b c 0 {
					f=1;
					break;
				} f=1 f 1 break; if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		} f==1 f 1 {
			System.out.println("-1");
		} System.out.println("-1") System.out.println System.out System System.out "-1" {
			System.out.println(b);
		} System.out.println(b) System.out.println System.out System System.out b String args[] args public class Main {

	public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	}


} public class Main {

	public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	}


} Main
import java.math.BigInteger;
import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

	public static void main(String args[])
	{
		Scanner input=new Scanner(System.in);
		int n,f=0;
		BigInteger a[]=new BigInteger[100005];
		n=input.nextInt();
		BigInteger b=new BigInteger("1");
		BigInteger c=new BigInteger("1000000000000000000");
		BigInteger d=new BigInteger("0");
		for(int i=1;i<=n;i++){
			a[i]=input.nextBigInteger();
			if(a[i].equals(d)){
				f=2;
				break;
			}
		}
		if(f==2){
			System.out.println("0");
		}
		else{
			for(int i=1;i<=n;i++){
				b=b.multiply(a[i]);
				if(b.compareTo(c)>0){
					f=1;
					break;
				}
			}
			if(f==1){
			System.out.println("-1");
		}
			else{
			System.out.println(b);
		}
		}
		
		
	}


}
