n = gets.chomp!.to_i
hs = gets.split(" ").map(&:to_i)

as = Array.new
#maxcount= 0
count = 0
for i in 0..n-2 do
  #count は回答を格納する変数

#while i <= n-2
    #print("hs[i]=#{hs[i]}, hs[i+1]=#{hs[i+1]}\n")
    if hs[i] >= hs[i+1]
      count += 1
    else
      as << count
      count = 0
      #break
    end
    #i+=1
  #end
  #p count
=begin
  if count > maxcount
  maxcount = count
  end
=end
end
as << count
p as.max
#p maxcount