import java.math.BigInteger;
import java.util.Scanner;
        
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    }
} 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 x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    } main {
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc BigInteger aaa = BigInteger.ONE; aaa BigInteger.ONE BigInteger BigInteger.ONE long check = 1000000000000000000L; check 1000000000000000000L long[] y = new long[x]; y new long[x] x boolean flag = false; flag false for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        } {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        } y[i] = Long.parseLong(sc.next()) y[i] y i Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc if (y[i] == 0) {
                flag = true;
            } y[i] == 0 y[i] y i 0 {
                flag = true;
            } flag = true flag true for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        } {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        } if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            } flag {
                aaa = BigInteger.valueOf(0);
                break;
            } aaa = BigInteger.valueOf(0) aaa BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 break; if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            } aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1 aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)) aaa.multiply(BigInteger.valueOf(y[i])).subtract aaa.multiply(BigInteger.valueOf(y[i])) aaa.multiply aaa BigInteger.valueOf(y[i]) BigInteger.valueOf BigInteger y[i] y i BigInteger.valueOf(check) BigInteger.valueOf BigInteger check 1 {
                aaa = BigInteger.valueOf(-1);
                break;
            } aaa = BigInteger.valueOf(-1) aaa BigInteger.valueOf(-1) BigInteger.valueOf BigInteger -1 1 break; {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            } aaa = aaa.multiply(BigInteger.valueOf(y[i])) aaa aaa.multiply(BigInteger.valueOf(y[i])) aaa.multiply aaa BigInteger.valueOf(y[i]) BigInteger.valueOf BigInteger y[i] y i System.out.println(aaa) System.out.println System.out System System.out aaa String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    }
} 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 x = sc.nextInt();
        BigInteger aaa = BigInteger.ONE;
        long check = 1000000000000000000L;
        long[] y = new long[x];
        boolean flag = false;
        for (int i = 0; i < x; i++) {
            y[i] = Long.parseLong(sc.next());
            if (y[i] == 0) {
                flag = true;
            }
        }
        for (int i = 0; i < x; i++) {
            if (flag) {
                aaa = BigInteger.valueOf(0);
                break;
            } else if (aaa.multiply(BigInteger.valueOf(y[i])).subtract(BigInteger.valueOf(check)).signum() == 1) {
                aaa = BigInteger.valueOf(-1);
                break;
            } else {
                aaa = aaa.multiply(BigInteger.valueOf(y[i]));
            }
        }
        System.out.println(aaa);
    }
}