fun main(arr:Array<String>) {
    val n = readLine()!!.toInt()
    val numbers = readLine()!!.split(" ").map { it.toLong() }
    val step = (0 until  n).map { 0 }.toMutableList()
    for(i in (1 until n)) {
        if(numbers[i] <= numbers [i-1]) {
            step[i] = step[i-1] + 1
        }
    }
    println(step.max())

}
