import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()
  val h = (1..n).map { sc.nextInt() }.toIntArray()

  var ans = 0
  var count = 0
  var pre = h.get(0)
  for (i in 1 until n) {
    val hi = h[i]
    if (hi <= pre) {
      count++
      ans = Math.max(ans, count)
    } else {
      count = 0
    }
    pre = hi
  }

  println(ans)
}
