fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val h = readLine()!!.split(" ").map(String::toInt)
    println(op139c(h))
}

fun op139c(h: List<Int>): Int {
    var max = 0
    var tmp = 0
    var lastNumber = 0

    for (i in h) {
        if (i <= lastNumber) tmp++ else tmp = 0
        lastNumber = i
        max = Math.max(max, tmp)
    }

    return max
}
