n = gets.chomp.to_i
h = gets.split.map(&:to_i)
cnt = 0
max = 0
for i in 0..(n-2)
    if h[i] >= h[i+1]
        cnt += 1
    else 
        if cnt > max 
            max = cnt
        end
        cnt = 0
    end 
end
if cnt > max 
    max = cnt
end
puts max