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

  j = 0
  ans = 0

  do i = 1, n-1
    if( g(i) == 0 ) then
      j = j + 1
    else
      if( j >= ans ) then
        ans = j
      end if
      j = 0
    end if
  end do
  if( j >= ans ) then
    ans = j
  end if

  print*, ans

  !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
