n = gets.to_i
h = gets.split.map(&:to_i)
i = 0
res = {}
while i < n - 1
  s = 0
  j = i
  while j < n - 1
    break unless h[j] >= h[j + 1]
    s += 1
    res[[h[i], i]] = s
    j += 1
  end
  i += 1
end

puts !res.empty? ? res.max_by{|(_k,v)| v}[1] : 0