fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val hList =  readLine()!!.split(" ").map(String::toDouble)
    var count = 0
    var maxCount = 0
    for (i in 0 until n-1) {
        if (hList[i] >= hList[i+1]) {
            count += 1
        } else {
            maxCount = Math.max(maxCount, count)
            count = 0
        }
    }
    maxCount = Math.max(maxCount, count)
    println(maxCount)
}