import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    }

    static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.math.BigDecimal; BigDecimal java.math import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    }

    static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    }
} Main public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Task solver = new Task(); solver new Task() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    } Task public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        } solve {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        } int N = in.nextInt(); N in.nextInt() in.nextInt in long A[] = CPUtils.readLongArray(N, in); A CPUtils.readLongArray(N, in) CPUtils.readLongArray CPUtils N in long answer = 1; answer 1 for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            } long a A {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            } {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            } if (a == 0)
                {
                    out.println(0);
                    return;
                } a == 0 a 0 {
                    out.println(0);
                    return;
                } out.println(0) out.println out 0 return; BigDecimal bigDecimal = new BigDecimal("1"); bigDecimal new BigDecimal("1") for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            } long a A {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            } {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            } bigDecimal = bigDecimal.multiply(new BigDecimal("" + a)) bigDecimal bigDecimal.multiply(new BigDecimal("" + a)) bigDecimal.multiply bigDecimal new BigDecimal("" + a) if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                } bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0 bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) bigDecimal.compareTo bigDecimal new BigDecimal("" + 1000000000000000000L) 0 {
                    out.println(-1);
                    return;
                } out.println(-1) out.println out -1 1 return; out.println(bigDecimal.toString()) out.println out bigDecimal.toString() bigDecimal.toString bigDecimal int testNumber testNumber Scanner in in PrintWriter out out static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    } CPUtils public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        } readLongArray {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        } long[] array = new long[size]; array new long[size] size for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            } int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
                array[i] = in.nextLong();
            } {
                array[i] = in.nextLong();
            } array[i] = in.nextLong() array[i] array i in.nextLong() in.nextLong in return array; array int size size Scanner in in public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    }

    static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    }
} public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    }

    static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task
    {
        public void solve(int testNumber, Scanner in, PrintWriter out)
        {
            int N = in.nextInt();
            long A[] = CPUtils.readLongArray(N, in);
            long answer = 1;
            for (long a : A)
            {
                if (a == 0)
                {
                    out.println(0);
                    return;
                }
            }
            BigDecimal bigDecimal = new BigDecimal("1");
            for (long a : A)
            {
                bigDecimal = bigDecimal.multiply(new BigDecimal("" + a));
                if (bigDecimal.compareTo(new BigDecimal("" + 1000000000000000000L)) > 0)
                {
                    out.println(-1);
                    return;
                }
            }
            out.println(bigDecimal.toString());
        }

    }

    static class CPUtils
    {
        public static long[] readLongArray(int size, Scanner in)
        {
            long[] array = new long[size];
            for (int i = 0; i < size; i++)
            {
                array[i] = in.nextLong();
            }
            return array;
        }

    }
}

