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

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
} import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	} main {
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc BigDecimal b = new BigDecimal("0"); b new BigDecimal("0") BigDecimal c = new BigDecimal("0"); c new BigDecimal("0") for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        } {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        } if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            } i == 0 i 0 {
                b = sc.nextBigDecimal();
            } b = sc.nextBigDecimal() b sc.nextBigDecimal() sc.nextBigDecimal sc {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            } c = sc.nextBigDecimal() c sc.nextBigDecimal() sc.nextBigDecimal sc if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                } b.compareTo(new BigDecimal("1000000000000000000")) <= 0 b.compareTo(new BigDecimal("1000000000000000000")) b.compareTo b new BigDecimal("1000000000000000000") 0 {
                  b = b.multiply(c);
                } b = b.multiply(c) b b.multiply(c) b.multiply b c if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                } b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0 b.compareTo(new BigDecimal("0")) == 0 b.compareTo(new BigDecimal("0")) b.compareTo b new BigDecimal("0") 0 c.compareTo(new BigDecimal("0")) == 0 c.compareTo(new BigDecimal("0")) c.compareTo c new BigDecimal("0") 0 {
                  System.out.println(0);
                  return;
                } System.out.println(0) System.out.println System.out System System.out 0 return; if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        } b.compareTo(new BigDecimal("1000000000000000000")) > 0 b.compareTo(new BigDecimal("1000000000000000000")) b.compareTo b new BigDecimal("1000000000000000000") 0 {
          System.out.println(-1);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 {
          System.out.println(b);
        } System.out.println(b) System.out.println System.out System System.out b String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
} Main
import java.math.BigDecimal;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int a = sc.nextInt();
       	BigDecimal b = new BigDecimal("0");
        BigDecimal c = new BigDecimal("0");

    	for (int i = 0; i < a; i++) {
          	if (i == 0) {
                b = sc.nextBigDecimal();
            } else {
                c = sc.nextBigDecimal();
              	if (b.compareTo(new BigDecimal("1000000000000000000")) <= 0) {
                  b = b.multiply(c);
                }
              	if (b.compareTo(new BigDecimal("0")) == 0
                   || c.compareTo(new BigDecimal("0")) == 0) {
                  System.out.println(0);
                  return;
                }
            }
        }

      	if (b.compareTo(new BigDecimal("1000000000000000000")) > 0) {
          System.out.println(-1);
        } else {
          System.out.println(b);
        }
	}
}