Module Module1

    Sub Main()

        Dim N As Integer = Console.ReadLine()
        Dim arr As String() = Split(Console.ReadLine())
        Dim x As Integer
        Dim i As Integer
        Dim kaisu As Integer = 0
        Dim saidai As Integer = 0

        For x = 0 To N - 2
            kaisu = 0
            For i = x To N - 2
                If CLng(arr(i)) >= CLng(arr(i + 1)) Then
                    kaisu += 1
                Else
                    Exit For
                End If
            Next
            If kaisu > saidai Then
                saidai = kaisu
            End If
        Next

        Console.WriteLine(saidai)

        'Console.ReadLine()

    End Sub

End Module
