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

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	} main {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	} Scanner kb = new Scanner(System.in); kb new Scanner(System.in) BigInteger count = new BigInteger("1"); count new BigInteger("1") int n = kb.nextInt(); n kb.nextInt() kb.nextInt kb boolean t = true; t true for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		} {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		} long j = kb.nextLong(); j kb.nextLong() kb.nextLong kb if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			} j != 0 j 0 {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				} t == true t true {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				} count = count.multiply(BigInteger.valueOf(j)) count count.multiply(BigInteger.valueOf(j)) count.multiply count BigInteger.valueOf(j) BigInteger.valueOf BigInteger j if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					} count.compareTo(new BigInteger("1000000000000000000")) == 1 count.compareTo(new BigInteger("1000000000000000000")) count.compareTo count new BigInteger("1000000000000000000") 1 {
						// System.out.println("k");
						t = false;
//				break;
					} t = false t false {
				count = new BigInteger("0");
				break;
			} count = new BigInteger("0") count new BigInteger("0") break; int res = count.compareTo(new BigInteger("1000000000000000000")); res count.compareTo(new BigInteger("1000000000000000000")) count.compareTo count new BigInteger("1000000000000000000") if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		} res == 1 res 1 {
			// System.out.println(res);
			System.out.println(-1);
		} System.out.println(-1) System.out.println System.out System System.out -1 1 {
			System.out.println(count);
		} System.out.println(count) System.out.println System.out System System.out count kb.close() kb.close kb String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	}

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

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner kb = new Scanner(System.in);
		BigInteger count = new BigInteger("1");
		int n = kb.nextInt();
		boolean t = true;
		for (int i = 0; i < n; i++) {
			long j = kb.nextLong();
			if (j != 0) {
				if (t == true) {
					count = count.multiply(BigInteger.valueOf(j));
					if (count.compareTo(new BigInteger("1000000000000000000")) == 1) {
						// System.out.println("k");
						t = false;
//				break;
					}
				}
			} else {
				count = new BigInteger("0");
				break;
			}
		}
		int res = count.compareTo(new BigInteger("1000000000000000000"));
		if (res == 1) {
			// System.out.println(res);
			System.out.println(-1);
		} else {
			System.out.println(count);
		}

		kb.close();
	}

}
