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