n = gets.to_i
nums = gets.split.map &:to_i
cnt = 0
max = 0
 
for i in 0...n-1
    if nums[i]>=nums[i+1]
        cnt += 1
        max = cnt if max < cnt
    else 
        cnt = 0
    end
end
 
puts max