#include <bits/stdc++.h>
using namespace std;

int banyak, n, maks;

int main() {
	cin>>n;
	int h[n];
	for (int i=0; i<n; i++) {
		cin>>h[i];
	}
	for (int i=1; i<n; i++) {
		if (h[i]<=h[i-1]) {
			banyak++;
			if (banyak>maks) maks=banyak;
		}
		else banyak=0;
	}
	cout<<maks<<endl;
}
