fun main(args: Array<String>) {
    readLine()
    val input =
        readLine()!!
            .split(" ")
            .map { it.toInt()}
    var maxCnt = 0
    var tmpCnt = 0
    var lastNum = 0
    for (n in input) {
        if (n <= lastNum) tmpCnt++  else tmpCnt = 0
        maxCnt = if (maxCnt > tmpCnt) maxCnt else tmpCnt
        lastNum = n
    }
    print(maxCnt)
}