import java.util.*;
import java.math.BigInteger;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		BigInteger bi = BigInteger.ONE;
		for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		}
		System.out.print(bi);
	}
}
 import java.util.*; util.* java import java.math.BigInteger; BigInteger java.math class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		BigInteger bi = BigInteger.ONE;
		for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		}
		System.out.print(bi);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		BigInteger bi = BigInteger.ONE;
		for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		}
		System.out.print(bi);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		BigInteger bi = BigInteger.ONE;
		for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		}
		System.out.print(bi);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc BigInteger bi = BigInteger.ONE; bi BigInteger.ONE BigInteger BigInteger.ONE for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		} int i=0; int i=0; i 0 i<N i N i++ i++ i {
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		} {
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		} BigInteger next = sc.nextBigInteger(); next sc.nextBigInteger() sc.nextBigInteger sc if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			} !bi.equals(BigInteger.valueOf(-1)) bi.equals(BigInteger.valueOf(-1)) bi.equals bi BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 {
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			} if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				} bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0 bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) bi.multiply(next).compareTo bi.multiply(next) bi.multiply bi next BigInteger.valueOf(1000000000000000000L) BigInteger.valueOf BigInteger 1000000000000000000L 0 {
					bi =  BigInteger.valueOf(-1);
				} bi =  BigInteger.valueOf(-1) bi BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 {
					bi = bi.multiply(next);
				} bi = bi.multiply(next) bi bi.multiply(next) bi.multiply bi next if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			} next.equals(BigInteger.ZERO) next.equals next BigInteger.ZERO BigInteger BigInteger.ZERO {
				bi = BigInteger.valueOf(0);
			} bi = BigInteger.valueOf(0) bi BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 System.out.print(bi) System.out.print System.out System System.out bi String[] args args
import java.util.*;
import java.math.BigInteger;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		BigInteger bi = BigInteger.ONE;
		for(int i=0; i<N; i++){
			BigInteger next = sc.nextBigInteger();
			if(!bi.equals(BigInteger.valueOf(-1))){
				if(bi.multiply(next).compareTo(BigInteger.valueOf(1000000000000000000L)) > 0){
					bi =  BigInteger.valueOf(-1);
				}else{
					bi = bi.multiply(next);
				}
			}else if(next.equals(BigInteger.ZERO)){
				bi = BigInteger.valueOf(0);
			}
		}
		System.out.print(bi);
	}
}

