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

int main() {
ll n;
cin>>n;
ll a[n];
for(ll i=0;i<n;i++)
{
cin>>a[i];
}
ll ans=0;
for(ll i=0;i<n;i++)
{  ll count=0;
  while(i+1<n && a[i+1]<=a[i])
  {
    count++;
      i++;
  }
  ans=max(ans,count);

}
cout<<ans<<endl;
}