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

max = 0
move_times = 0
(n - 1).times do |i|
    if pillars[i] >= pillars[i + 1]
        move_times += 1
    else
        max = move_times if max < move_times
        move_times = 0
    end
end
max = move_times if max < move_times
puts max
