import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.charset.StandardCharsets;
public class Main {
    BigDecimal asd = new BigDecimal(1000000000);
    public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    }

    public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    }

} import java.util.*; util.* java import java.io.*; io.* java import java.math.BigDecimal; BigDecimal java.math import java.nio.file.Files; Files java.nio.file import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {
    BigDecimal asd = new BigDecimal(1000000000);
    public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    }

    public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    }

} Main BigDecimal asd = new BigDecimal(1000000000); asd new BigDecimal(1000000000) public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    } sol {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    } asd= asd.multiply(asd) asd asd.multiply(asd) asd.multiply asd asd BigDecimal ans = new BigDecimal(1); ans new BigDecimal(1) boolean ret = false; ret false String[] ss = s.split(" "); ss s.split(" ") s.split s " " BigDecimal[] arr = new BigDecimal[ss.length]; arr new BigDecimal[ss.length] ss.length ss ss.length for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        } int i=0; int i=0; i 0 i<ss.length i ss.length ss ss.length i++ i++ i {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        } {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        } arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i])) arr[i] arr i BigDecimal.valueOf(Long.parseLong(ss[i])) BigDecimal.valueOf BigDecimal Long.parseLong(ss[i]) Long.parseLong Long ss[i] ss i if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            } arr[i] == BigDecimal.ZERO arr[i] arr i BigDecimal.ZERO BigDecimal BigDecimal.ZERO {
                System.out.println("0");
                return;
            } System.out.println("0") System.out.println System.out System System.out "0" return; for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        } BigDecimal k arr {
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        } {
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        } ans = ans.multiply(k) ans ans.multiply(k) ans.multiply ans k if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            } ans.compareTo(asd)>0 ans.compareTo(asd) ans.compareTo ans asd 0 {
                System.out.println("-1");
                return;
            } System.out.println("-1") System.out.println System.out System System.out "-1" return; System.out.println(ans) System.out.println System.out System System.out ans String s s long j j public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    } main {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    } Main aka = new Main(); aka new Main() BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) long num = Long.parseLong(br.readLine()); num Long.parseLong(br.readLine()) Long.parseLong Long br.readLine() br.readLine br String s = br.readLine(); s br.readLine() br.readLine br aka.sol(s,num) aka.sol aka s num String[] args args public class Main {
    BigDecimal asd = new BigDecimal(1000000000);
    public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    }

    public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    }

} public class Main {
    BigDecimal asd = new BigDecimal(1000000000);
    public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    }

    public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    }

} Main
import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.nio.file.Files;
import java.nio.charset.StandardCharsets;
public class Main {
    BigDecimal asd = new BigDecimal(1000000000);
    public void sol(String s,long j) {
        asd= asd.multiply(asd);
        BigDecimal ans = new BigDecimal(1);
        boolean ret = false;
        String[] ss = s.split(" ");
        BigDecimal[] arr = new BigDecimal[ss.length];
        for (int i=0;i<ss.length;i++) {
            arr[i] = BigDecimal.valueOf(Long.parseLong(ss[i]));
            if (arr[i] == BigDecimal.ZERO) {
                System.out.println("0");
                return;
            }
        }
        for(BigDecimal k:arr){
            ans = ans.multiply(k);
            if(ans.compareTo(asd)>0){
                System.out.println("-1");
                return;
            }
        }
        System.out.println(ans);


    }

    public static void main(String[] args)  throws IOException {
        // Use the Scanner class
        Main aka = new Main();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        long num = Long.parseLong(br.readLine());
        String s = br.readLine();
        //int tot = Integer.parseInt(br.readLine());

        aka.sol(s,num);
//        int i =1;
//        System.out.println();
//        while(tot>0){
//
//            String s = br.readLine();
//            String[] sr = s.split(" ");
//            List<Long> ls = new ArrayList<>();
//            for(String ss:sr){
//                ls.add(Long.parseLong(ss));
//            }
//            Main tt = new Main();
//            tt.sol(ls);
//            // String Buffer to store answer
//            StringBuffer sb = new StringBuffer();
////            Solution obj = new Solution();
////
////            System.out.println("Case #"+i+": "+obj.sol());
//            tot--;
//            i++;
//        }
    }

}
