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