program test
implicit none
  integer,allocatable::a(:)
  integer :: N,i,ans,k
  read*,N
  allocate(a(N))
  read(*,*)(a(i),i=1,N)
  k=0
  ans=0
  do i=1,N-1
  	if(a(i)>=a(i+1))then
    	k=k+1
        ans=max(k,ans)
    else 
    	k=0
        ans=max(k,ans)
    end if
 end do
 print*,ans
end program test