//package acm.biginter;

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

public class Main {
    public static void main(String args[])
    {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    }
} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[])
    {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    }
} Main public static void main(String args[])
    {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    } main {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int n; n n = cin.nextInt() n cin.nextInt() cin.nextInt cin BigInteger x x ans; ans ans = new BigInteger("1") ans new BigInteger("1") int flag = 0; flag 0 for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        } int i = 1; int i = 1; i 1 i <= n i n i ++ i ++ i {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        } {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        } x = cin.nextBigInteger() x cin.nextBigInteger() cin.nextBigInteger cin if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            } x.compareTo(BigInteger.valueOf(0)) == 0 x.compareTo(BigInteger.valueOf(0)) x.compareTo x BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 0 {
                ans = BigInteger.valueOf(0);
                flag = 1;
            } ans = BigInteger.valueOf(0) ans BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 flag = 1 flag 1 if(flag == 0) ans = ans.multiply(x); flag == 0 flag 0 ans = ans.multiply(x) ans ans.multiply(x) ans.multiply ans x if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1; ans.compareTo(new BigInteger("1000000000000000000")) > 0 ans.compareTo(new BigInteger("1000000000000000000")) ans.compareTo ans new BigInteger("1000000000000000000") 0 flag = 1 flag 1 if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans); ans.compareTo(new BigInteger("1000000000000000000")) > 0 ans.compareTo(new BigInteger("1000000000000000000")) ans.compareTo ans new BigInteger("1000000000000000000") 0 {
            System.out.println("-1");
        } System.out.println("-1") System.out.println System.out System System.out "-1" 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 cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    }
} public class Main {
    public static void main(String args[])
    {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    }
} Main
//package acm.biginter;

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

public class Main {
    public static void main(String args[])
    {
        Scanner cin = new Scanner(System.in);
        int n;
        n = cin.nextInt();
        BigInteger x,ans;
        ans = new BigInteger("1");
        int flag = 0;
        for(int i = 1;i <= n;i ++)
        {
            x = cin.nextBigInteger();
            if(x.compareTo(BigInteger.valueOf(0)) == 0)
            {
                ans = BigInteger.valueOf(0);
                flag = 1;
            }
            if(flag == 0) ans = ans.multiply(x);
            if(ans.compareTo(new BigInteger("1000000000000000000")) > 0) flag = 1;
        }
        if(ans.compareTo(new BigInteger("1000000000000000000")) > 0)
        {
            System.out.println("-1");
        }
        else System.out.println(ans);
    }
}
