#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int n,i,max=0,count=0;
	cin>>n;
	long int a[n];
	cin>>a[0];
	for(i=1;i<n;i++)
	{
		cin>>a[i];
		if(a[i]<=a[i-1])
		count++;
		else
		count=0;
		if(max<count)
		max=count;
	}
	cout<<max;
	return 0;
}