program prob2
    implicit none
    integer :: N, i, tmp, ans
    integer, allocatable :: a(:)
    read(*,*) N
    allocate(a(N))
    read(*,*) a

    tmp = 1
    ans = 1
    do i = 2, N
        if(a(i-1) >= a(i))then
            tmp = tmp + 1
        else
            ans = max(ans, tmp)
            tmp = 1
        end if
    end do
    ans = max(ans, tmp)

    write(*,*) ans-1


    deallocate(a)

    stop
contains
end program prob2