program main
  implicit none
  integer :: n, i, streak
  integer, allocatable :: h(:), lower(:)
  read (*, *) n
  allocate (h(n), lower(n - 1))
  read (*, *) h(:)
  lower(:) = 0
  streak = 0
  do i = 1, n - 1
    if (h(i + 1) <= h(i)) then
      streak = streak + 1
      lower(i) = streak
    else
      streak = 0
    end if
  end do
  write (*, "(i0)") maxval(lower)
end program main
