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

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	}

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

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	}

} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan BigDecimal[] an = new BigDecimal[n]; an new BigDecimal[n] n for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		} {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		} BigDecimal a = scan.nextBigDecimal(); a scan.nextBigDecimal() scan.nextBigDecimal scan if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			} BigDecimal.ZERO.compareTo(a) == 0 BigDecimal.ZERO.compareTo(a) BigDecimal.ZERO.compareTo BigDecimal.ZERO BigDecimal BigDecimal.ZERO a 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 an[i] = a an[i] an i a BigDecimal ans = BigDecimal.ONE; ans BigDecimal.ONE BigDecimal BigDecimal.ONE for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		} int i = 0; int i = 0; i 0 i < an.length i an.length an an.length i++ i++ i {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		} {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		} ans = ans.multiply(an[i]) ans ans.multiply(an[i]) ans.multiply ans an[i] an i if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			} ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0 ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) ans.compareTo ans BigDecimal.ONE.scaleByPowerOfTen(18) BigDecimal.ONE.scaleByPowerOfTen BigDecimal.ONE BigDecimal BigDecimal.ONE 18 0 {
				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 if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		} ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0 ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) ans.compareTo ans BigDecimal.ONE.scaleByPowerOfTen(18) BigDecimal.ONE.scaleByPowerOfTen BigDecimal.ONE BigDecimal BigDecimal.ONE 18 0 {
			System.out.println(ans);
		} System.out.println(ans) System.out.println System.out System System.out ans {
			System.out.println(-1);
		} System.out.println(-1) System.out.println System.out System System.out -1 1 scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	}

} public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	}

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

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		BigDecimal[] an = new BigDecimal[n];

		for (int i = 0; i < n; i++) {
			BigDecimal a = scan.nextBigDecimal();
			if (BigDecimal.ZERO.compareTo(a) == 0) {
				System.out.println(0);
				System.exit(0);
			}
			an[i] = a;
		}

		BigDecimal ans = BigDecimal.ONE;
		for (int i = 0; i < an.length; i++) {
			ans = ans.multiply(an[i]);
			if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) > 0) {
				System.out.println(-1);
				System.exit(0);
			}
		}

		if (ans.compareTo(BigDecimal.ONE.scaleByPowerOfTen(18)) <= 0) {
			System.out.println(ans);
		} else {
			System.out.println(-1);
		}

		scan.close();
	}

}
