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

public class Main {
	public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	}
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	} main {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	} BigInteger MAX = new BigInteger("1000000000000000000"); MAX new BigInteger("1000000000000000000") Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc BigInteger[] s = new BigInteger[n]; s new BigInteger[n] n BigInteger ans = BigInteger.ONE; ans BigInteger.ONE BigInteger BigInteger.ONE for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		} {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		} s[i] = sc.nextBigInteger() s[i] s i sc.nextBigInteger() sc.nextBigInteger sc if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			} s[i].compareTo(BigInteger.ZERO) == 0 s[i].compareTo(BigInteger.ZERO) s[i].compareTo s[i] s i BigInteger.ZERO BigInteger BigInteger.ZERO 0 {
				System.out.println(0);
				System.exit(0);
			} System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		} {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		} ans = ans.multiply(s[i]) ans ans.multiply(s[i]) ans.multiply ans s[i] s i if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			} ans.compareTo(MAX) == 1 ans.compareTo(MAX) ans.compareTo ans MAX 1 {
				System.out.println(-1);
				System.exit(0);
			} System.out.println(-1) System.out.println System.out System System.out -1 1 System.exit(0) System.exit System 0 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	}
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		BigInteger MAX = new BigInteger("1000000000000000000");
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger[] s = new BigInteger[n];
		BigInteger ans = BigInteger.ONE;
		for (int i = 0; i < n; i++) {
			s[i] = sc.nextBigInteger();
			if (s[i].compareTo(BigInteger.ZERO) == 0) {
				System.out.println(0);
				System.exit(0);
			}
		}

		for (int i = 0; i < n; i++) {
			ans = ans.multiply(s[i]);
			if (ans.compareTo(MAX) == 1) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		System.out.println(ans);
	}
}