program main
  implicit none
  integer(8) i,HS,CS,N
  integer(8),allocatable :: H(:)
  read(*, *) N
  allocate(H(N))
  read(*, *) (H(i), i = 1,N)
  HS = 0
  CS = 0
  do i =1,N-2
    if (H(i) >= H(i+1)) then
      CS = CS + 1
    else
      if (CS > HS) then
        HS = CS
      end if
      CS = 0
    endif
  end do
  if (H(N-1) >= H(N)) then
    CS = CS + 1
    if (CS > HS) then
      HS = CS
    end if
  else
    if (CS > HS) then
      HS = CS
    end if
  endif

  write(*, *) HS
end program main
