#include<bits/stdc++.h>
using namespace std;
int main(){
int n;cin>>n;
vector<int> arr(n);
for(int i=0;i<n;++i)cin>>arr[i];
int result = 0;
int tmp = 0;
for(int i=0;i<n-1;++i){
	if(arr[i]>=arr[i+1]){
		tmp++;
		result = max(tmp,result);
	}else{
		tmp=0;
	}
}
cout<<result<<endl;
return 0;
}