program main
    implicit none
    integer:: N
    integer, allocatable:: H(:)
    integer:: c_move, max_move, i

    read*, N
    allocate(H(N))
    read*, H(1:N)
    ! print*, H(1:N)
    c_move = 0
    max_move = 0


    do i = 1, N-1
        ! print*, '--- ---', c_move, max_move
        ! print*, H(i),H(i+1)
        if( H(i) >= H(i+1) ) then
            ! print*, 'down'
            c_move = c_move + 1
        else
            ! print*, 'no_down'
            if (c_move > max_move) then
                ! print*, 'renew'
                max_move = c_move
            endif
            c_move = 0
        endif
    enddo

    if (c_move > max_move) then
        max_move = c_move
    endif

    print'(i0)', max_move
end program