#include<bits/stdc++.h>
using namespace std;
int n,a[100010],ans=0,maxn=0;

int main()
{	cin>>n;
	for(int i=1;i<=n;++i)
		cin>>a[i];
	for(int i=1;i<=n;++i)
	{
		while(i<=n && a[i]<=a[i-1])
			ans++,++i;
		maxn=max(maxn,ans);
		ans=0;
	}
	cout<<maxn<<endl;
	return 0;
} 