import java.math.BigDecimal;
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        }
} import java.math.BigDecimal; BigDecimal java.math import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        } main {
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) BigDecimal maximum = new BigDecimal("1000000000000000000"); maximum new BigDecimal("1000000000000000000") int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc boolean isbiggerthan = false; isbiggerthan false BigDecimal bdNum1 = new BigDecimal(sc.next()); bdNum1 new BigDecimal(sc.next()) for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        } int i=1; int i=1; i 1 i<N i N i++ i++ i {
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        } {
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        } String s = sc.next(); s sc.next() sc.next sc if(s.equals("0")){
			System.out.println(0);
			return;
          } s.equals("0") s.equals s "0" {
			System.out.println(0);
			return;
          } System.out.println(0) System.out.println System.out System System.out 0 return; if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          } !isbiggerthan isbiggerthan {
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          } BigDecimal bdNumx = new BigDecimal(s); bdNumx new BigDecimal(s) bdNum1 = bdNum1.multiply(bdNumx) bdNum1 bdNum1.multiply(bdNumx) bdNum1.multiply bdNum1 bdNumx if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         } bdNum1.compareTo(maximum) == 1 bdNum1.compareTo(maximum) bdNum1.compareTo bdNum1 maximum 1 {
            isbiggerthan = true;
         } isbiggerthan = true isbiggerthan true if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    } isbiggerthan {
          System.out.println(-1);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 {
        System.out.println(bdNum1);
        
    } System.out.println(bdNum1) System.out.println System.out System System.out bdNum1 String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        }
} Main
import java.math.BigDecimal;
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
      
      	BigDecimal maximum = new BigDecimal("1000000000000000000");
        // 整数の入力
        int N = sc.nextInt();
        boolean isbiggerthan = false;
		BigDecimal bdNum1 = new BigDecimal(sc.next());
        for(int i=1;i<N;i++){
          String s = sc.next();
          if(s.equals("0")){
			System.out.println(0);
			return;
          }
          if (!isbiggerthan){
          BigDecimal bdNumx = new BigDecimal(s);
          bdNum1 = bdNum1.multiply(bdNumx); 
          }
         if(bdNum1.compareTo(maximum) == 1){
            isbiggerthan = true;
         }
        }
        if(isbiggerthan){
          System.out.println(-1);
        }else{
        System.out.println(bdNum1);
        
    }
        }
}