object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val cellCount: Int = sc.nextInt
  val cellList = List.fill(cellCount)(sc.nextInt)

  val ans = go(cellList.head, cellList.tail)

  def go(curr: Int, remains: List[Int], maxLength: Int = 0, currentLength: Int = 0): Int = {
    remains match {
      case Nil => Math.max(maxLength, currentLength)
      case h::t if (curr >= h) => go(h, t, maxLength, currentLength + 1)
      case h::t => go(h, t, Math.max(maxLength, currentLength))
    }
  }

  println(ans)
}