#include <bits/stdc++.h>
#define ll long long
#define f first
#define s second
using namespace std;
int main(){
	int n,x,t=0,maxi=0,last=2000000000;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x;
		if(x>last){
			t=1;
		}else t++;
		last=x;
		maxi=max(maxi,t);
	}
	cout<<maxi-1;
	return 0;
}