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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	}
} import java.math.BigDecimal; BigDecimal java.math import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long[] a = new long[n]; a new long[n] n for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			a[i] = sc.nextLong();
		} {
			a[i] = sc.nextLong();
		} a[i] = sc.nextLong() a[i] a i sc.nextLong() sc.nextLong sc Arrays.parallelSort(a) Arrays.parallelSort Arrays a BigDecimal result = BigDecimal.ONE; result BigDecimal.ONE BigDecimal BigDecimal.ONE for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		} int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		} {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		} if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			} a[i] == 0 a[i] a i 0 {
				result = BigDecimal.ZERO;
				break;
			} result = BigDecimal.ZERO result BigDecimal.ZERO BigDecimal BigDecimal.ZERO break; if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			} result.compareTo(BigDecimal.valueOf(-1)) == 0 result.compareTo(BigDecimal.valueOf(-1)) result.compareTo result BigDecimal.valueOf(-1) BigDecimal.valueOf BigDecimal -1 1 0 {
				break;
			} break; result = result.multiply(BigDecimal.valueOf(a[i])) result result.multiply(BigDecimal.valueOf(a[i])) result.multiply result BigDecimal.valueOf(a[i]) BigDecimal.valueOf BigDecimal a[i] a i if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			} result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0 result.compareTo(BigDecimal.valueOf(1000000000000000000L)) result.compareTo result BigDecimal.valueOf(1000000000000000000L) BigDecimal.valueOf BigDecimal 1000000000000000000L 0 {
				result = BigDecimal.valueOf(-1);
			} result = BigDecimal.valueOf(-1) result BigDecimal.valueOf(-1) BigDecimal.valueOf BigDecimal -1 1 System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	}
} Main
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a = new long[n];
		for (int i = 0; i < a.length; i++) {
			a[i] = sc.nextLong();
		}
		Arrays.parallelSort(a);
		BigDecimal result = BigDecimal.ONE;
		for (int i = 0; i < a.length; i++) {
			if(a[i] == 0) {
				result = BigDecimal.ZERO;
				break;
			} else if(result.compareTo(BigDecimal.valueOf(-1)) == 0) {
				break;
			}
			result = result.multiply(BigDecimal.valueOf(a[i]));
			if(result.compareTo(BigDecimal.valueOf(1000000000000000000L)) > 0) {
				result = BigDecimal.valueOf(-1);
			}
		}
		System.out.println(result);
	}
}
