N = gets.chomp.to_i
HS = gets.chomp.split(" ").map(&:to_i)

a = 0
ans = -1
ct = 0
while a < N
  if a + 1 < N && HS[a] >= HS[a + 1]
    ct += 1
    a += 1
    next
  end

  ans = [ans, ct].max
  ct = 0
  a += 1
end

puts ans