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

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	}

} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	} main {
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long Num = sc.nextLong(); Num sc.nextLong() sc.nextLong sc BigInteger resultMul = new BigInteger("1"); resultMul new BigInteger("1") long resultMax = (long) Math.pow(10, 18); resultMax (long) Math.pow(10, 18) Math.pow Math 10 18 long tmp; tmp for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		} long i=0; long i=0; i 0 i<Num i Num i++ i++ i {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		} {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		} tmp = sc.nextLong() tmp sc.nextLong() sc.nextLong sc if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			} tmp == 0 tmp 0 {
				resultMul = new BigInteger("0");
				break;
			} resultMul = new BigInteger("0") resultMul new BigInteger("0") break; if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			} resultMul.compareTo(new BigInteger("0")) > 0 resultMul.compareTo(new BigInteger("0")) resultMul.compareTo resultMul new BigInteger("0") 0 {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			} resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp))) resultMul resultMul.multiply(new BigInteger(String.valueOf(tmp))) resultMul.multiply resultMul new BigInteger(String.valueOf(tmp)) if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				} resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0 resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) resultMul.compareTo resultMul new BigInteger(String.valueOf(resultMax)) 0 {
					resultMul = new BigInteger("-1");
				} resultMul = new BigInteger("-1") resultMul new BigInteger("-1") System.out.println(resultMul.longValue()) System.out.println System.out System System.out resultMul.longValue() resultMul.longValue resultMul sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	}

} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	}

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

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		long Num = sc.nextLong();

		BigInteger resultMul = new BigInteger("1");
		long resultMax = (long) Math.pow(10, 18);
		long tmp;

		for (long i=0;i<Num;i++) {
			tmp = sc.nextLong();
			if(tmp == 0) {
				resultMul = new BigInteger("0");
				break;
			}
			if(resultMul.compareTo(new BigInteger("0")) > 0) {
				resultMul = resultMul.multiply(new BigInteger(String.valueOf(tmp)));
				if(resultMul.compareTo(new BigInteger(String.valueOf(resultMax))) > 0) {
					resultMul = new BigInteger("-1");
				}
			}

		}

		System.out.println(resultMul.longValue());
		sc.close();

	}

}