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

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    }
} import java.util.Scanner; Scanner java.util import java.math.BigInteger; BigInteger java.math import java.lang.Math; Math java.lang public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long[] a = new long[n]; a new long[n] n for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            a[i] = sc.nextLong();
        } {
            a[i] = sc.nextLong();
        } a[i] = sc.nextLong() a[i] a i sc.nextLong() sc.nextLong sc for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        } int k = 0; int k = 0; k 0 k<n k n k++ k++ k {
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        } {
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        } if(a[k] == 0){
                System.out.println(0);
                return;
            } a[k] == 0 a[k] a k 0 {
                System.out.println(0);
                return;
            } System.out.println(0) System.out.println System.out System System.out 0 return; BigInteger mul = BigInteger.ONE; mul BigInteger.ONE BigInteger BigInteger.ONE for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        } int j = 0; int j = 0; j 0 j<n j n j++ j++ j {
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        } {
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        } mul = mul.multiply(BigInteger.valueOf(a[j])) mul mul.multiply(BigInteger.valueOf(a[j])) mul.multiply mul BigInteger.valueOf(a[j]) BigInteger.valueOf BigInteger a[j] a j if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            } mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1 mul.compareTo(BigInteger.valueOf(1000000000000000000L)) mul.compareTo mul BigInteger.valueOf(1000000000000000000L) BigInteger.valueOf BigInteger 1000000000000000000L 1 {
                mul = BigInteger.valueOf(-1);
                j=n;
            } mul = BigInteger.valueOf(-1) mul BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 j=n j n System.out.println(mul) System.out.println System.out System System.out mul String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    }
} Main
import java.util.Scanner;
import java.math.BigInteger;
import java.lang.Math;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        long[] a = new long[n];
        for(int i = 0; i<n; i++){
            a[i] = sc.nextLong();
        }

        for(int k = 0; k<n; k++){
            if(a[k] == 0){
                System.out.println(0);
                return;
            }   
        }

        BigInteger mul = BigInteger.ONE;
        for(int j = 0; j<n; j++){
            mul = mul.multiply(BigInteger.valueOf(a[j]));
            if(mul.compareTo(BigInteger.valueOf(1000000000000000000L)) == 1){
                mul = BigInteger.valueOf(-1);
                j=n;
            }
        }
        System.out.println(mul);
    }
}