program ccc

implicit none
integer :: i, n, res1, res2
integer,allocatable,dimension(:) :: h

read(*,*) n
allocate(h(n))
read(*,*) h

res1 = -1
res2 = 0

do i=n,1,-1
if (h(i)>=h(i+1)) then
res1 = res1 + 1
res2 = max(res1,res2)
else
res1 = -1
end if
end do

write(*,'(i0)') res2

end program