#include<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b[100000],c=0,d=0;
  cin>>a;
  for(int i=0;i<a;i++){
    cin>>b[i];
    if(i!=0){
      if(b[i-1]>=b[i]) d++;
      else d=0;
    }
    c=max(d,c);
  }
  cout<<c<<"\n";
}