# include <iostream>
# include <cstdio>
# include <cmath>
# include <cstring>
using namespace std;
const double PI=3.1415926;
int X[10005],Y[10005];
int i,j,k;
int A=0,B=0,C=0;
int m,n,a,b,c,N;
int main()
{
	cin>>N;
	for(i=1;i<=N;i++)
	{
		scanf("%d",&X[i]);
		if(X[i]<=X[i-1])
		{
			A++;
			if(A>B)
			B=A;
		}
		else
		{
			A=0;
		}
		
	}
	cout<<B;
	return 0;
}