fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val H = readLine()!!.split(" ").map { it.toInt() }

    var max = 0
    var count = -1
    var before = Int.MAX_VALUE

    (0 until N).forEach { i ->
        val current = H[i]
        if (before >= current) {
            count++
        } else {
            max = Math.max(max, count)
            count = 0
        }
        before = current
    }
    max = Math.max(max, count)
    println(max)
}