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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	}
} import java.math.*; math.* java import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	} main {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	} Scanner sc = new Scanner(System.in) ; sc new Scanner(System.in) int n n result result flag = 0 flag 0 zero = 0 ; zero 0 n = sc.nextInt() n sc.nextInt() sc.nextInt sc BigInteger val = BigInteger.valueOf(1) val BigInteger.valueOf(1) BigInteger.valueOf BigInteger 1 check = new BigInteger("1000000000000000000") check new BigInteger("1000000000000000000") x ; x for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		} {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		} x = sc.nextBigInteger() x sc.nextBigInteger() sc.nextBigInteger sc if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			} x.compareTo(BigInteger.valueOf(0)) == 0 x.compareTo(BigInteger.valueOf(0)) x.compareTo x BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 0 {
				zero = 1 ;
				break ;
			} zero = 1 zero 1 break ; if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			} flag == 0 flag 0 {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			} val = val.multiply(x) val val.multiply(x) val.multiply val x result = val.compareTo(check) result val.compareTo(check) val.compareTo val check if (result == 1) {
					flag = 1 ;
				} result == 1 result 1 {
					flag = 1 ;
				} flag = 1 flag 1 if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		} zero == 1 zero 1 System.out.print(0) System.out.print System.out System System.out 0 {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		} if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ; flag == 1 flag 1 System.out.println(-1) System.out.println System.out System System.out -1 1 System.out.println(val) System.out.println System.out System System.out val System.gc() System.gc System String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	}
} Main
import java.math.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in) ;
		int n, result, flag = 0, zero = 0 ;
		n = sc.nextInt() ;
		BigInteger val = BigInteger.valueOf(1), check = new BigInteger("1000000000000000000"), x ;
		for (int i = 0; i < n; i++) {
			x = sc.nextBigInteger() ;
			if (x.compareTo(BigInteger.valueOf(0)) == 0) {
				zero = 1 ;
				break ;
			}
			if (flag == 0) {
				val = val.multiply(x) ;
				result = val.compareTo(check) ;
				if (result == 1) {
					flag = 1 ;
				}
			}
		}
		if (zero == 1)	System.out.print(0) ;
		else {
			if (flag == 1)	System.out.println(-1) ;
			else	System.out.println(val) ;
		}
		System.gc(); 
	}
}
