import java.util.*;
import java.math.BigInteger;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  }  
} import java.util.*; util.* java import java.math.BigInteger; BigInteger java.math public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  }  
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  } main {
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc BigInteger ans  = BigInteger.ONE; ans BigInteger.ONE BigInteger BigInteger.ONE long l = (long)Math.pow(10,18); l (long)Math.pow(10,18) Math.pow Math 10 18 BigInteger L = BigInteger.valueOf(l); L BigInteger.valueOf(l) BigInteger.valueOf BigInteger l while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    } sc.hasNext() sc.hasNext sc {
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    } long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      } a == 0 a 0 {
        ans = BigInteger.ZERO;
      } ans = BigInteger.ZERO ans BigInteger.ZERO BigInteger BigInteger.ZERO if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      } ans.compareTo(L) <= 0 ans.compareTo(L) ans.compareTo ans L 0 {
        ans = ans.multiply(BigInteger.valueOf(a));
      } ans = ans.multiply(BigInteger.valueOf(a)) ans ans.multiply(BigInteger.valueOf(a)) ans.multiply ans BigInteger.valueOf(a) BigInteger.valueOf BigInteger a if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    } ans.compareTo(L) <= 0 ans.compareTo(L) ans.compareTo ans L 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 String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  }  
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  }  
} Main
import java.util.*;
import java.math.BigInteger;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int num = sc.nextInt();
    BigInteger ans  = BigInteger.ONE;
    long l = (long)Math.pow(10,18);
    BigInteger L = BigInteger.valueOf(l);
    while(sc.hasNext()){
      long a = sc.nextLong();
      if (a == 0) {
        ans = BigInteger.ZERO;
      } else if (ans.compareTo(L) <= 0) {
        ans = ans.multiply(BigInteger.valueOf(a));
      }
    }
    if(ans.compareTo(L) <= 0){
      System.out.println(ans);
    }else{
      System.out.println(-1);
    }
  }  
}