program sequence_decomposing
    implicit none
    integer(4):: n,i,c,cmax
    integer(8):: a1,a2

    read*,n
    read*,a1
    c=1
    cmax=0
    do i=1,n-1
        read*, a2

        if (a2 <= a1)then
            c=c+1
        else
            cmax=max(cmax,c)
            c=1
        end if
        a1=a2
    end do

    print*,max(cmax,c)




end program sequence_decomposing