object Main extends App {
    val input = scala.io.Source.stdin.getLines.toList
    val n = input(0).toInt
    val stairs = input(1).split(" ").map(_.toInt)
    var max = 0
    var current = 0
    for (i <- 0 until n - 1) {
      if (stairs(i) >= stairs(i + 1))
        current = current + 1
      else {
        if (current > max) {
          max = current
        }
        current = 0
      }
    }
    if (current > max)
      max = current
    
    println(max)
}