import java.math.BigInteger;
import java.util.Scanner;
public class Main {
    public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ;

    public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    }
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
    public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ;

    public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    }
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    }
} Main public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ; MAX_VALUE new BigInteger("1000000000000000000") public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    } solve {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    } BigInteger result = BigInteger.ONE; result BigInteger.ONE BigInteger BigInteger.ONE for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        } BigInteger value arr {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        } {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        } result = value.multiply(result) result value.multiply(result) value.multiply value result if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1"); result.compareTo(MAX_VALUE) > 0 result.compareTo(MAX_VALUE) result.compareTo result MAX_VALUE 0 return new BigInteger("-1"); new BigInteger("-1") return result; result BigInteger [] arr arr public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    } main {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    } Scanner sn = new Scanner(System.in); sn new Scanner(System.in) int n = sn.nextInt(); n sn.nextInt() sn.nextInt sn BigInteger [] arr = new BigInteger[n]; arr new BigInteger[n] n for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        } {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        } arr[i] = new BigInteger(sn.next()) arr[i] arr i new BigInteger(sn.next()) if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            } arr[i].compareTo(BigInteger.ZERO) == 0 arr[i].compareTo(BigInteger.ZERO) arr[i].compareTo arr[i] arr i BigInteger.ZERO BigInteger BigInteger.ZERO 0 {
                System.out.println(0);
                return;
            } System.out.println(0) System.out.println System.out System System.out 0 return; System.out.println(solve(arr).toString()) System.out.println System.out System System.out solve(arr).toString() solve(arr).toString solve(arr) solve arr String[] args args public class Main {
    public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ;

    public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    }
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    }
} public class Main {
    public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ;

    public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    }
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    }
} Main
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
    public static final BigInteger MAX_VALUE = new BigInteger("1000000000000000000") ;

    public static BigInteger solve(BigInteger [] arr) {
        BigInteger result = BigInteger.ONE;
        for (BigInteger value : arr) {

            result = value.multiply(result);
            if (result.compareTo(MAX_VALUE) > 0) return new BigInteger("-1");
        }
        return result;
    }
    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);

        int n = sn.nextInt();
        BigInteger [] arr = new BigInteger[n];
        for(int i = 0; i<n ; i++) {
            arr[i] = new BigInteger(sn.next());
            if(arr[i].compareTo(BigInteger.ZERO) == 0) {
                System.out.println(0);
                return;
            }
        }
        System.out.println(solve(arr).toString());
    }
}