program main
  
  implicit none
  integer :: n
  integer, allocatable :: h(:)
  integer :: i,j,k,ans
  
  read(*,*) n
  allocate( h(n) )
  read(*,*) h
  
  ans = 0 
  do i = 1, n-1
    k = 0
    do j = i, n-1
      if( h(j) >= h(j+1) ) then
        k = k + 1
      else
        exit
      end if
    end do
    if( k > ans ) then
      ans = k
    end if
  end do
  print*, ans
end program main
