object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt
  val cells = List.fill(n)(sc.nextLong())

  def Lower(in: List[Long]): Int = {
    @annotation.tailrec
    def f(inn: List[Long], max: Int, nowLength: Int, beforeH: Long): Int = inn match {
      case Nil => if (max > nowLength) max else nowLength
      case ::(h, tl) =>
        if (beforeH != -1 && beforeH >= h)
          f(tl, max, nowLength + 1, h)
        else
          f(tl, if (max > nowLength) max else nowLength, 0, h)
    }

    f(in, 0, 0, -1)
  }
  println(Lower(cells))
}