import java.util.*


fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)

    var N: Long
    N = sc.nextLong()
    val H = Array((N).toInt()){0L}
    for (i in 0 until N) {
        H[(i).toInt()] = sc.nextLong()
    }
    solve(N, H)
}

fun solve(N: Long, H: Array<Long>) {
    var res = 0
    var t = 0

    for (i in 0 until H.size - 1) {
        if (H[i] >= H[i + 1]) {
            t++
        } else {
            t = 0
        }
        res = Math.max(res, t)
    }

    println(res)
}

