fun main(args: Array<String>) {
    var n = readLine()!!.toInt()
    val h = readLine()!!.split(" ").map { it.toInt() }.toMutableList()
    var m = 0
    var i = 0
    var cnt = 0
    while (i < n - 1) {
        if (h[i] >= h[i + 1]) {
            cnt++
            m = Math.max(m, cnt)
        } else {
            cnt = 0
        }
        i++
    }
    println(m)
}
