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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in) ;
        int n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    }
} 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) ;
        int n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in) ;
        int n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    } main {
        Scanner sc = new Scanner(System.in) ;
        int n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    } Scanner sc = new Scanner(System.in) ; sc new Scanner(System.in) int n = sc.nextInt() ; n sc.nextInt() sc.nextInt sc BigInteger ans = BigInteger.ONE ; ans BigInteger.ONE BigInteger BigInteger.ONE BigInteger b[] = new BigInteger[n] ; b new BigInteger[n] n BigInteger cmp = new BigInteger("1000000000000000000") ; cmp new BigInteger("1000000000000000000") Boolean zero = false ; zero false for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        } int i = 0 ; int i = 0 ; i 0 i < n i n i ++ i ++ i {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        } {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        } b[i] = sc.nextBigInteger() b[i] b i sc.nextBigInteger() sc.nextBigInteger sc if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ; b[i].compareTo(BigInteger.ZERO) == 0 b[i].compareTo(BigInteger.ZERO) b[i].compareTo b[i] b i BigInteger.ZERO BigInteger BigInteger.ZERO 0 zero = true zero true if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        } zero System.out.println(0) System.out.println System.out System System.out 0 {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        } Boolean con = true ; con true for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            } int i = 0 ; int i = 0 ; i 0 i < n i n i ++ i ++ i {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            } {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            } ans = ans.multiply(b[i]) ans ans.multiply(b[i]) ans.multiply ans b[i] b i if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                } ans.compareTo(cmp) == 1 ans.compareTo(cmp) ans.compareTo ans cmp 1 {
                    con = false ;
                    break ;
                } con = false con false break ; if(con) System.out.println(ans);
            else System.out.println(-1); con System.out.println(ans) System.out.println System.out System System.out ans 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 n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) 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 n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    }
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in) ;
        int n = sc.nextInt() ;
        BigInteger ans = BigInteger.ONE ;
        BigInteger b[] = new BigInteger[n] ;
        BigInteger cmp = new BigInteger("1000000000000000000") ;
        Boolean zero = false ;
        for (int i = 0 ; i < n ; i ++) {
            b[i] = sc.nextBigInteger() ;
            if(b[i].compareTo(BigInteger.ZERO) == 0) zero = true ;
        }
        if(zero) System.out.println(0);
        else {
            Boolean con = true ;
            for (int i = 0 ; i < n ; i ++) {
                ans = ans.multiply(b[i]) ;
                if(ans.compareTo(cmp) == 1) {
                    con = false ;
                    break ;
                }
            }
            if(con) System.out.println(ans);
            else System.out.println(-1);
        }
    }
}
