length = gets.to_i
array = gets.split(" ").map(&:to_i)
result = 0
count = 0

(1..length).each do |i|
  if i == length
    result = count if result < count
    break
  end

  if array[i] <= array[i - 1]
    count += 1
  else
    result = count if result < count
    count = 0
  end
end

puts result