import java.math.BigInteger;
import java.util.*;
 
public class Main{
    public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    }
} import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main{
    public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    }
} Main public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    } main {
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) int N = sn.nextInt(); N sn.nextInt() sn.nextInt sn BigInteger result = BigInteger.ONE; result BigInteger.ONE BigInteger BigInteger.ONE long x = (long)Math.pow(10, 18); x (long)Math.pow(10, 18) Math.pow Math 10 18 int flag = 0; flag 0 long[] A = new long[N]; A new long[N] N for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        } int n=0; int n=0; n 0 n<N n N n++ n++ n {
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        } {
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        } A[n] = sn.nextLong() A[n] A n sn.nextLong() sn.nextLong sn if (A[n] == 0) flag = 1; A[n] == 0 A[n] A n 0 flag = 1 flag 1 if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        } flag == 1 flag 1 System.out.println(0) System.out.println System.out System System.out 0 {
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        } for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            } int n=0; int n=0; n 0 n<N n N n++ n++ n {
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            } {
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            } result = result.multiply(BigInteger.valueOf(A[n])) result result.multiply(BigInteger.valueOf(A[n])) result.multiply result BigInteger.valueOf(A[n]) BigInteger.valueOf BigInteger A[n] A n if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                } result.compareTo(BigInteger.valueOf(x)) == 1 result.compareTo(BigInteger.valueOf(x)) result.compareTo result BigInteger.valueOf(x) BigInteger.valueOf BigInteger x 1 {
                    System.out.println(-1);
                    flag = 2;
                    break;
                } System.out.println(-1) System.out.println System.out System System.out -1 1 flag = 2 flag 2 break; if(flag != 2)System.out.println(result); flag != 2 flag 2 System.out.println(result) System.out.println System.out System System.out result String args[] args public class Main{
    public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    }
} public class Main{
    public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    }
} Main
import java.math.BigInteger;
import java.util.*;
 
public class Main{
    public static void main(String args[]){
        Scanner sn = new Scanner(System.in);
        int N = sn.nextInt();
        BigInteger result = BigInteger.ONE;
        long x = (long)Math.pow(10, 18);
        int flag = 0;
 
        long[] A = new long[N];
 
        for(int n=0; n<N; n++){
            A[n] = sn.nextLong();
            if (A[n] == 0) flag = 1;
        }
 
        if(flag == 1) System.out.println(0);
        else{
            for(int n=0; n<N; n++){
                result = result.multiply(BigInteger.valueOf(A[n]));
                if(result.compareTo(BigInteger.valueOf(x)) == 1){
                    System.out.println(-1);
                    flag = 2;
                    break;
                }
            }
            if(flag != 2)System.out.println(result);
        }
    }
}