nn = gets.to_i
hh = gets.split.map(&:to_i)

max = 0
cnt = 0
prev = hh[0]
1.upto(nn-1) do |n|
  if prev >= hh[n]
    cnt += 1
  else
    if max < cnt
      max = cnt
    end
    cnt = 0
  end
  #puts cnt#d
  prev = hh[n]
end
if max < cnt
  max = cnt
end
puts max