n = gets.to_i
heights = gets.split

record = 0
i = 0

def check(ls)
  if ls.length <= 1 then return 0 end
  cnt = 0
  while cnt < ls.length-1
    if ls[cnt]>=ls[cnt+1] then cnt += 1 else return cnt end
  end
  return cnt
end

while i < heights.length do
  new_record = check(heights)
  if new_record > record then record=new_record end
  i += 0
  heights.shift
end

puts record
