program sample
    implicit none
  
    integer(8) :: i,j,m,n,a
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) n
    allocate(x(n))
    read(*,*)x
    a=0
    m=0
    do i=2,n
        if(x(i-1)>=x(i))then
            a=a+1
        else
            if(a>m)then
               m=a
            end if

            a=0
        end if
    end do
    if(a>m)then
        m=a
    end if



    write(*,*)m
  
    stop
end program sample
  

