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

public class Main {

    public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    }
} Main public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    } main {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    } int N = (int) 1e5 + 5; N (int) 1e5 + 5 (int) 1e5 5 BigInteger max = new BigInteger("1000000000000000000"); max new BigInteger("1000000000000000000") BigInteger[] A = new BigInteger[N]; A new BigInteger[N] N int n; n Scanner in = new Scanner(System.in); in new Scanner(System.in) n = in.nextInt() n in.nextInt() in.nextInt in int flag = 0 flag 0 flag1 = 0; flag1 0 for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        } {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        } A[i] = in.nextBigInteger() A[i] A i in.nextBigInteger() in.nextBigInteger in if (A[i].compareTo(max) == 1) {
                flag = 1;
            } A[i].compareTo(max) == 1 A[i].compareTo(max) A[i].compareTo A[i] A i max 1 {
                flag = 1;
            } flag = 1 flag 1 if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            } A[i].compareTo(new BigInteger("0")) == 0 A[i].compareTo(new BigInteger("0")) A[i].compareTo A[i] A i new BigInteger("0") 0 {
                flag1 = 1;
            } flag1 = 1 flag1 1 BigInteger m = new BigInteger(String.valueOf(1)); m new BigInteger(String.valueOf(1)) if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        } flag1 == 1 flag1 1 {
            System.out.println("0");
        } System.out.println("0") System.out.println System.out System System.out "0" if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        } flag == 1 flag 1 {
            System.out.println("-1");
        } System.out.println("-1") System.out.println System.out System System.out "-1" {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        } for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            } {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            } m = m.multiply(A[i]) m m.multiply(A[i]) m.multiply m A[i] A i if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                } m.compareTo(max) == 1 m.compareTo(max) m.compareTo m max 1 {
                    flag = 1;
                    break;
                } flag = 1 flag 1 break; if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            } flag == 1 flag 1 {
                System.out.println("-1");
            } System.out.println("-1") System.out.println System.out System System.out "-1" {
                System.out.println(m);
            } System.out.println(m) System.out.println System.out System System.out m String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    }
} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        int N = (int) 1e5 + 5;
        BigInteger max = new BigInteger("1000000000000000000");
        BigInteger[] A = new BigInteger[N];
        int n;
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        int flag = 0, flag1 = 0;
        for (int i = 0; i < n; i++) {
            A[i] = in.nextBigInteger();
            if (A[i].compareTo(max) == 1) {
                flag = 1;
            }
            if (A[i].compareTo(new BigInteger("0")) == 0) {
                flag1 = 1;
            }
        }
        BigInteger m = new BigInteger(String.valueOf(1));
        if (flag1 == 1) {
            System.out.println("0");
        } else if (flag == 1) {
            System.out.println("-1");
        } else {
            for (int i = 0; i < n; i++) {
                m = m.multiply(A[i]);
//            System.out.println(m.compareTo(max));
                if (m.compareTo(max) == 1) {
                    flag = 1;
                    break;
                }
            }
            if (flag == 1) {
                System.out.println("-1");
            } else {
                System.out.println(m);
            }
        }


    }
}
