Module Module1

    Sub main()
        Dim user1 = Console.ReadLine()
        Dim user2 As List(Of String) = New List(Of String)(Split(Console.ReadLine(), " "))

        Dim total As Long = 1

        For Each myNum In user2
            Try
                total *= CDbl(myNum)
                If total >= 10 ^ 18 Then
                    total = -1
                End If
            Catch ex As OverflowException
                total = -1  ' 想定できるバグが残るが……
            End Try
        Next

        Console.WriteLine(total)
    End Sub
end module