program main
integer :: i,n,cnt=0,big=0
integer,allocatable :: h(:)

read *,n
allocate(h(n))
read *,h

do i = 1,n-1
cnt = 0
do j = i,n-1
if (h(j)>=h(j+1)) then
cnt = cnt + 1
else
exit
end if
end do
print *,cnt
big = max(cnt,big)
end do

print *,big

end program