import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    } main {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    } Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in))); sc new Scanner(new BufferedReader(new InputStreamReader(System.in))) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long Ans = 1; Ans 1 for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        } int i =0 ; int i =0 ; i 0 i < N i N i++ i++ i {
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        } {
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        } long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc if(a ==0 ){
                System.out.println(0);
                return;
            } a ==0 a 0 {
                System.out.println(0);
                return;
            } System.out.println(0) System.out.println System.out System System.out 0 return; Ans = Ans * a Ans Ans * a Ans a long b = (long)Math.pow(10 , 18); b (long)Math.pow(10 , 18) Math.pow Math 10 18 if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        } Ans > b || Ans == 0 Ans > b Ans b Ans == 0 Ans 0 {
            System.out.println(-1);
        } System.out.println(-1) System.out.println System.out System System.out -1 1 {
            System.out.println(Ans);
        } 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(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = sc.nextInt();
        long Ans = 1;
        for (int i =0 ; i < N; i++){
            long a = sc.nextLong();
            if(a ==0 ){
                System.out.println(0);
                return;
            }
            Ans = Ans * a;
        }
        long b = (long)Math.pow(10 , 18);
        if(Ans > b || Ans == 0){
            System.out.println(-1);
        }else{
            System.out.println(Ans);
        }
    }
}
