process.stdin.resume();
process.stdin.setEncoding('utf8'); 
var lines = [];
var reader = require('readline').createInterface({
	input: process.stdin,
	output: process.stdout
});
 
reader.on('line', (line) => {
	lines.push(line);
});

reader.on('close', () => {
	"use strict"
	const N=+lines[0];
	const H=lines[1].split(" ").map(Number);
	
	var temp=0;
	var ans=0;
	
	for(var i=1;i<N;i++){
		if(H[i]<=H[i-1]){
			temp++;
			temp>ans && (ans=temp);
		} else {
			temp=0;
		}
	}
	console.log(ans);
});