Imports System

Module Program

    Sub Main(args As String())
        Dim iInputN As Integer = Console.ReadLine()
        Dim iInput As String() = Console.ReadLine().Split(" ")

        Dim i As Integer
        Dim tmp As Long = 1


        For i = 1 To iInputN
            tmp *= Long.Parse(iInput(i - 1))

        Next

        If tmp > 10 ^ 18 Then
            Console.WriteLine(-1)
        Else
            Console.WriteLine(tmp)
        End If




    End Sub
End Module
