import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	static BigInteger limit = new BigInteger("1000000000000000000");

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

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

	static BigInteger limit = new BigInteger("1000000000000000000");

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	}
} Main static BigInteger limit = new BigInteger("1000000000000000000"); limit new BigInteger("1000000000000000000") public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	} main {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	} try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		} Exception e {
			System.out.println(-1);
			e.printStackTrace();
		} System.out.println(-1) System.out.println System.out System System.out -1 1 e.printStackTrace() e.printStackTrace e {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc List<BigInteger> values = new ArrayList<BigInteger>(); values new ArrayList<BigInteger>() for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
				values.add(sc.nextBigInteger());
			} {
				values.add(sc.nextBigInteger());
			} values.add(sc.nextBigInteger()) values.add values sc.nextBigInteger() sc.nextBigInteger sc Collections.sort(values) Collections.sort Collections values BigInteger result = BigInteger.ONE; result BigInteger.ONE BigInteger BigInteger.ONE for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			} BigInteger value values {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			} {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			} result = result.multiply(value) result result.multiply(value) result.multiply result value if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				} result.equals(BigInteger.ZERO) result.equals result BigInteger.ZERO BigInteger BigInteger.ZERO {
					System.out.println(0);
					return;
				} System.out.println(0) System.out.println System.out System System.out 0 return; if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				} limit.compareTo(result) < 0 limit.compareTo(result) limit.compareTo limit result 0 {
					System.out.println(-1);
					return;
				} System.out.println(-1) System.out.println System.out System System.out -1 1 return; System.out.println(result.toString()) System.out.println System.out System System.out result.toString() result.toString result String[] args args public class Main {

	static BigInteger limit = new BigInteger("1000000000000000000");

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	}
} public class Main {

	static BigInteger limit = new BigInteger("1000000000000000000");

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	}
} Main
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	static BigInteger limit = new BigInteger("1000000000000000000");

	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in);) {
			int num = sc.nextInt();
			List<BigInteger> values = new ArrayList<BigInteger>();
			for (int i = 0; i < num; i++) {
				values.add(sc.nextBigInteger());
			}
			Collections.sort(values);

			BigInteger result = BigInteger.ONE;
			for (BigInteger value : values) {
				result = result.multiply(value);

				if (result.equals(BigInteger.ZERO)) {
					System.out.println(0);
					return;
				} else if (limit.compareTo(result) < 0) {
					System.out.println(-1);
					return;
				}
			}

			System.out.println(result.toString());

		} catch (Exception e) {
			System.out.println(-1);
			e.printStackTrace();
		}

	}
}
