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
            total *= CDbl(myNum)

            ' 想定できるバグが残るけど……
            If total >= 10 ^ 18 Or total <= 0 Then
                total = -1
            End If
        Next

        Console.WriteLine(total)
    End Sub
end module