



object Main {

  def read(): (Int, Array[Int]) = {
    val n = scala.io.StdIn.readInt()
    val hArr = scala.io.StdIn.readLine().split(" ").map(_.toInt)
    (n, hArr)
  }


  def solve(n: Int, hArr: Array[Int]): Int = {
    var maxMovedCount = 0
    var tmpCount = 0
    for(i <- 0 until hArr.length - 1) {
      if(hArr(i) >= hArr(i+1)) {
        tmpCount += 1
        maxMovedCount = Math.max(maxMovedCount, tmpCount)
      } else {
        tmpCount = 0
      }
    }
    maxMovedCount
  }


  def main(args: Array[String]): Unit = {
    val (n, hArr) = read()
    println(solve(n, hArr))
  }

}
