program main
    integer::n,a=0,t=0,i
    integer,allocatable::h(:)
    read *,n
    allocate(h(n))
    read *,h(:)
    do i=2,n
    	if(h(i-1)>=h(i))then
        	t=t+1
        else
        	a=max(a,t)
            t=0
        end if
    end do
    a=max(a,t)
    print '(i0)',a
end program main