import java.math.*;
import java.util.*;
public class Main
{
        public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        }
} import java.math.*; math.* java import java.util.*; util.* java public class Main
{
        public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        }
} Main public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        } main {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        } Scanner cin = new Scanner(System.in); cin new Scanner(System.in) int a; a a = cin.nextInt() a cin.nextInt() cin.nextInt cin BigInteger t = new BigInteger("1000000000000000000"); t new BigInteger("1000000000000000000") BigInteger ans = BigInteger.valueOf(1); ans BigInteger.valueOf(1) BigInteger.valueOf BigInteger 1 for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            } int i=1; int i=1; i 1 i<=a i a i++ i++ i {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            } {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            } int f; f BigInteger n = cin.nextBigInteger(); n cin.nextBigInteger() cin.nextBigInteger cin int vis = n.compareTo(BigInteger.valueOf(0)); vis n.compareTo(BigInteger.valueOf(0)) n.compareTo n BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                } vis == 0 vis 0 {
                    ans = BigInteger.valueOf(0);
                } ans = BigInteger.valueOf(0) ans BigInteger.valueOf(0) BigInteger.valueOf BigInteger 0 f = ans.compareTo(t) f ans.compareTo(t) ans.compareTo ans t if(vis != 0 && f <= 0)
                ans = ans.multiply(n); vis != 0 && f <= 0 vis != 0 vis 0 f <= 0 f 0 ans = ans.multiply(n) ans ans.multiply(n) ans.multiply ans n int k = ans.compareTo(t); k ans.compareTo(t) ans.compareTo ans t if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n"); k <= 0 k 0 System.out.println(ans) System.out.println System.out System System.out ans System.out.println("-1\n") System.out.println System.out System System.out "-1\n" String[] args args public class Main
{
        public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        }
} public class Main
{
        public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        }
} Main
import java.math.*;
import java.util.*;
public class Main
{
        public static void main(String[] args)
        {
            Scanner cin = new Scanner(System.in);
            int a;
            a = cin.nextInt();
            BigInteger t = new BigInteger("1000000000000000000");
            BigInteger ans = BigInteger.valueOf(1);
            for(int i=1;i<=a;i++)
            {
                int f;
                BigInteger n = cin.nextBigInteger();
                int vis = n.compareTo(BigInteger.valueOf(0));
                if (vis == 0)
                {
                    ans = BigInteger.valueOf(0);
                }
                f = ans.compareTo(t);
                if(vis != 0 && f <= 0)
                ans = ans.multiply(n);
            }
            int k = ans.compareTo(t);
            if(k <= 0)
                System.out.println(ans);
            else System.out.println("-1\n");
        }
}