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 N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    }
} 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 N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    }
} Main public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        BigInteger N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    } main {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        BigInteger N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc BigInteger N=new BigInteger("1000000000000000000"); N new BigInteger("1000000000000000000") BigInteger ans=new BigInteger("1"); ans new BigInteger("1") BigInteger n0=new BigInteger("0"); n0 new BigInteger("0") int flag=1; flag 1 int num=1; num 1 for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        } int i=1; int i=1; i 1 i<=n i n ++i ++i i {
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        } {
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        } BigInteger x=sc.nextBigInteger(); x sc.nextBigInteger() sc.nextBigInteger sc if(x.compareTo(n0)==0) num=0; x.compareTo(n0)==0 x.compareTo(n0) x.compareTo x n0 0 num=0 num 0 if(flag==0) continue; flag==0 flag 0 continue; ans=ans.multiply(x) ans ans.multiply(x) ans.multiply ans x if(ans.compareTo(N)>0) {
                flag=0;
            } ans.compareTo(N)>0 ans.compareTo(N) ans.compareTo ans N 0 {
                flag=0;
            } flag=0 flag 0 if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans); num==0 num 0 System.out.println(0) System.out.println System.out System System.out 0 if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans); ans.compareTo(N)>0||flag==0 ans.compareTo(N)>0 ans.compareTo(N) ans.compareTo ans N 0 flag==0 flag 0 System.out.println("-1") System.out.println System.out System System.out "-1" System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        BigInteger N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    }
} public class Main {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        BigInteger N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    }
} 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 N=new BigInteger("1000000000000000000");
        BigInteger ans=new BigInteger("1");
        BigInteger n0=new BigInteger("0");


        int flag=1;
        int num=1;
        for(int i=1;i<=n;++i){
            BigInteger x=sc.nextBigInteger();
            if(x.compareTo(n0)==0) num=0;
            if(flag==0) continue;
            ans=ans.multiply(x);
            if(ans.compareTo(N)>0) {
                flag=0;
            }
        }

        if(num==0) System.out.println(0);
        else if(ans.compareTo(N)>0||flag==0) System.out.println("-1");
        else System.out.println(ans);
    }
}