fun main(args: Array<String>) {
    readLine()
    val hl = readLine()!!.split(" ").map { it.toLong() }

    var count = -1
    var pre = Long.MAX_VALUE
    var max = 0
    hl.forEach { cur ->
        if (cur <= pre) {
            count++
        } else {
            if (count > max) {
                max = count
            }
            count = 0
        }
        pre = cur
    }
    if (count > max) {
        max = count
    }

    print(max)
}
