
fun main(args:Array<String>) {
    val n = readLine()!!.toInt()
    val masu = readLine()!!.split(" ").map { it.toLong() }
    val move = masu.indices.map { 0 }.toMutableList()
    for(i in (0 until masu.size - 1).reversed()) {
        if(masu[i] >= masu[i+1]) {
            move[i] = move[i+1] + 1
        } else {
            move[i] = 0
        }
    }
    val ans = move.max()!!
    println(ans)

}
