stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3936756176486658x):
#include <bits/stdc++.h>



using namespace std;

const int N=3e5+5;

int a[N];

int main()

{

    ios_base::sync_with_stdio(0);

    cin.tie(0);cout.tie(0);

    int n;

    cin>>n;

    for(int i=0;i<n;i++)

        cin>>a[i];

    int ans=0;

    for(int i=0;i<n;i++)

    {

        int cnt=0;

        while(i+1<n&&a[i]>=a[i+1])

        {

            cnt++;

            i++;

        }

        ans=max(ans,cnt);

    }

    cout<<ans<<endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.412580607539907x):
#include <bits/stdc++.h>



using namespace std;



const int NMAX = 1e5 + 10;

int v[NMAX],n,dp[NMAX],ans;



int main(){

    int i,j;

    cin >> n;

    for(i = 1 ; i <= n ; i++)

        cin >> v[i];



    for(i = n ; i >= 1 ; i--)

        if(v[i] >= v[i + 1]){

            dp[i] = dp[i + 1] + 1;

            ans = max(dp[i], ans);

        }else

            dp[i] = 1;



    cout << ans - 1;



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3986395475042832x):
#include <bits/stdc++.h>

using namespace  std;

int dig (long long  x)

{

    int ans=0;

    while(x)

    {

        x/=10;

        ans++;



    }

    return  ans;

}





int main()

{

  int n;

  cin>>n;

vector <int> vec;

for(int i=0;i<n;i++)

{int x;

cin>>x;

vec.push_back(x);

}

int ans=0;

int cn=0;

for(int i=0;i<n-1;i++)

{

   // cout<<count

    if(vec[i]<vec[i+1]) {

        if (cn > ans)

            ans = cn;

        cn = 0;

    }

    else

        cn++;

}

if(cn>ans)

    ans=cn;

cout<<ans;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.410520714401226x):
#include <iostream>

#include <bits/stdc++.h>

using namespace std;



#define pb push_back

#define F first

#define S second

#define fo(i,a,b)  for(int i = a; i < b; i++)



using ll = long long;

using ld = long double;

using ul = unsigned long long;

using ii = pair<int, int>;

#define Mosta     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define ReadFile            freopen("input.in","r",stdin)

#define WriteFile           freopen("output.txt","w",stdout)

const ll mod7 = 1000000007,mod = 1000000000,OO = 0x3f3f3f3f;

const ld EPS = 1e-7;

double Pi=acos(-1);

const ld rad=Pi/180.0;

ll power(ll x, ll y, ll p)

{

    ll res = 1;

    while (y > 0)

    {

        if (y & 1)

            res = (res*x) % p;

        y = y>>1;

        x = (x*x) % p;

    }

    return res;

}

ll nCr (ll n,ll m)

{

        return(m == 0)?1:n*nCr(n-1,m-1)/m;

}

/*****************************************************/



int main()

{

    int n;

    cin >> n;

    int a[n];

    ll ans = 0 , x = 0;

    for(int i = 1; i <= n; ++i)

        cin >> a[i];



    for(int i = 1; i <= n-1; ++i){

        if(a[i] >= a[i+1]){

            x++;

        }else{

            ans = max(ans , x);

            x = 0;

        }

    }

    if(x >= 1)

        ans = max(ans , x);

    cout << ans << "\n";



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4182242275213242x):
#include <bits/stdc++.h>

using namespace std;

const int N=1e5+5;

int A[N],n,cnt,mx,mn;

int main(){

    scanf("%d",&n);

    for(int i=0;i<n;++i)

        scanf("%d",A+i);

    mn=A[0];

    for(int i=1;i<n;++i){

        if(A[i]<=mn){

            mx=max(++cnt,mx);

            mn=A[i];

        }else{

        cnt=0;

        mn=A[i];

        }

    }

    printf("%d",mx);





    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2927453569703313x):
#include <iostream>



using namespace std;



int main()

{



    int length;     cin >> length;



    int height[1000000], answer = 0, fanswer = 0;

    cin >> height[0];

    for (int i = 1; i < length; i++){

        cin >> height[i];

        if (height[i] <= height[i-1]){

            answer++;

        }

        else {

            answer = 0;

        }



        if (answer > fanswer){

            fanswer = answer;

        }

    }



    cout << fanswer << endl;



    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.384706786274463x):
#include <bits/stdc++.h>

using namespace std;

#define endl              "\n"

#define pb              push_back

#define fir               first

#define sec               second

#define all(v)            ((v).begin()), ((v).end())

#define sz(v)            ((int)((v).size()))

#define ll              long long

#define ld              long double

#define lp(i, n)        for(int i = 0 ; (int)i<n ; i++)

#define loop(i, x, n)       for(int i=x ; (int)i<=n ; i++)

#define isPowerOfTwo(s) (!(s & (s-1)))

typedef vector<int> vi;

typedef deque<int> de;

void origi() {

    ios_base::sync_with_stdio(false);

    cin.tie(nullptr), cout.tie(nullptr);

}

void tiranga() {

    int n;

    cin >> n;

    int arr[100003];

    lp(i, n) cin >> arr[i];

    int Max = INT_MIN;

    int step = 0;

    lp(i, n-1) {

        if (arr[i + 1] <= arr[i])

            step++;

        else {

            Max = max(Max, step);

            step = 0;

        }

    }

    Max = max(Max, step);

    cout << Max;

}

int main() {

#ifndef ONLINE_JUDGE.

    //freopen("input.txt", "r", stdin);

#else

#endif

    

    origi();

    tiranga();

    //cout << sumOfDig(123654);

   // genLarge(10, 10);

   // genSmall(10);



}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.41066489350522x):
#include <iostream>



using namespace std;

const int N = 1e5 + 5;

int arr[N];

int main()

{

    int n;

    cin >> n;

    for(int i = 0; i < n; i++)

    {

        cin >> arr[i];

    }

    int ans , beg;

    ans = beg = 0;

    for(int i = 1; i < n; i++)

    {

        if(arr[i] > arr[i - 1])

        {

            beg = i;

        }

        ans = max(ans, i - beg);

    }

    cout << ans << endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.41394403262656x):
#include <bits/stdc++.h>

#define ll long long

using namespace std;



ll a,b,ans,sum=1,arc,mx,l;

int main() {

    cin>>a;

    for(int i=0;i<a;i++){

        cin>>arc;

        if(i && arc <= sum){

            l++;

        }else{

            l=0;

        }

        mx = max(l,mx);

        sum = arc;

    }

    cout<<mx;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.394840621738912x):
#include <bits/stdc++.h>

using namespace std;

#define f first

#define s second

#define ll long long

#define ld long double

#define pii pair <int,int>

#define pll pair <ll,ll>

#define pil pair <int,ll>

#define pli pair <ll,int>

#define ull unsigned long long

#define pdd pair <double,double>

#define pb push_back

#define mp make_pair

#define puu pair<ull,ull>

#define pvv pair<vector<int>, vector<int> >

#define _bp __builtin_popcount

#define ptt pair <Tree*,Tree*>

#define all(v) v.begin(),v.end()

#define en "\n"

//const long double pi = acos(-1);

void boos()

{

     ios_base :: sync_with_stdio(false);

     cin.tie(0);

     cout.tie(0);

}

void file()

{

   freopen("max.in","r",stdin);

   freopen("max.out","w",stdout);

}

const ll INF = 1e9 + 7;

const ll INF1 = 998244353;

const ll LLINF = (ll)1e18;

const ll INTmx = (int)1e9;

const ld EPS = (ld)1e-9;

const int N = 3e5 + 100;

int a[N];

int main()

{

    //file();

    boos();

    int n;

    cin >> n;

    int ans = 0;

    for(int i = 1;i <= n;i++)

    {

    	cin >> a[i];

	}

	ans = 0;

	int tek = 0;

	for(int i = 2;i <= n;i++)

	{

		if(a[i] <= a[i - 1])tek++;

		else {

			ans = max(ans,tek);

			tek = 0;

		}

	}

	ans = max(ans,tek);

	cout << ans;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3914819385894561x):
#include<bits/stdc++.h>

using namespace std;

#define  ft  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define  ll  long long

#define  pi  pair<int,int>

#define  pb  push_back

#define  F   first

#define  S   second

const int N=2e5+2;

int a[N],b[N];

int main()

{

    ft

    int t,i,j,n,m,l,r,z=0;

    cin>>n;

    for(i=0;i<n;i++)

    {

        cin>>a[i];

    }

    for(i=1;i<n;i++)

    {

        if(a[i]<=a[i-1])

        {

            b[i]=b[i-1]+1;

            z=max(z,b[i]);

        }

        else

        {

            b[i]=0;

        }

    }

    cout<<z<<"\n";

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4118825792428404x):
#include <bits/stdc++.h>

using namespace std;



int main( )

{

    int n, i, j, k;

    int c = 0, mxc = 0;

    cin >> n;

    int p; cin >> p;

    c = 1;

    for (i = 2; i <= n; i++) {

        cin >> j;

        if (p >= j) {

            c++;

        }

        else {

            mxc = max(mxc, c);

            c = 1;

        }

        p = j;

    }

    mxc = max(mxc, c);

    cout << mxc - 1 << '\n';

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4095412489367378x):
#include <bits/stdc++.h>



using namespace std;



int main() {

  int n; cin >> n;

  vector <int> a(n);

  for(auto &x : a) cin >> x;

  int cur = a[0];

  int len = 0;

  int ans = 0;

  for(int i = 0; i < n; i++) {

    if(a[i] > cur) {

      ans = max(ans, len);

      len = 1;

      cur = a[i];

    } else cur = a[i], len++;

  }

  ans = max(ans, len);

  cout << ans - 1 << '\n';

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4119014907277876x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    long long n,h,m=0,mi=0,p,i;

    cin>>n;

    for(i=0;i<n;i++)

    {

        cin>>h;

        if(i==0)

            p=h;

        else

        {

            if(h<=p)

                m++;

            else

            {

                if(m>mi)

                    mi=m;

                m=0;

            }

        }

        p=h;

    }

    if(m>mi)

        mi=m;

    cout<<mi<<endl;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3865989235045462x):
////////////////////////// Author

////////////////////////// Nasim Hossain Rabbi

////////////////////////// JU-CSE28

////////////////////////// CF - imnasim3.1415

////////////////////////// UVA - imnasim3.1415

////////////////////////// Mail - imnasim3.1415@gmail.com

#include<bits/stdc++.h>

using namespace std;

#define sz size()

#define mk make_pair

#define clr clear()

#define B begin()

#define E end()

#define EM empty()

#define mem(a,b) memset(a,b,sizeof(a))

#define rep(i,n) for(i=0;i<n;i++)

#define Rep(i,n) for(i=1;i<=n;i++)

#define all(cont) cont.begin(),cont.end()

#define pb push_back

string en="\n";

string t="hello";

#define sqr(a) ((a) * (a))

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)

#define pi 3.1415926535897932384626433832795

#define vi vector<int>

#define vl vector<long long>

#define vs vector<string>

#define vp(vi,x) cin>>x; vi.pb(x);

#define LB(a,x) (lower_bound(all(a),x)-a.B)

#define UB(a,x) (upper_bound(all(a),x)-a.B)

typedef long long LL;

typedef unsigned long long ULL;

bool isVowel(char ch){ ch=toupper(ch); if(ch=='A'||ch=='U'||ch=='I'||ch=='O'||ch=='E') return true; return false;}

int toInt(string s){int sm;stringstream ss(s);ss>>sm;return sm;}

template<typename T>inline T gcd(T a,T b){if(a<0)return gcd(-a,b);if(b<0)return gcd(a,-b);return (b==0)?a:gcd(b,a%b);}

template<typename T>inline T lcm(T a,T b) {if(a<0)return lcm(-a,b);if(b<0)return lcm(a,-b);return a*(b/gcd(a,b));}

int main()

{

//    fast;

    LL i,j,k,n,m,l,s=0,x,y,tc=1,c=0;

    while(cin>>n)

    {

        vi a;

        rep(i,n)

        {

            vp(a,x);

        }

        s=c=0;

        for(i=0;i<n-1;i++)

        {

            if(a[i+1]>a[i])

            {

                if(c>s) s=c;

                c=0;

            }

            else c++;

        }

        if(c>s) s=c;

        cout<<s<<en;

    }

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.378516053962031x):
#include<bits/stdc++.h>

using namespace std;

#define LL long long int

#define DL double

#define MLL map<LL,LL>::iterator

#define MSL map<string,L>::iterator

#define MLS map<LL,string>::iterator

#define MSS map<string,string>::iterator

#define MCL map<char,LL>::iterator

#define SL set<LL>::iterator

#define SS set<string>::iterator sl

#define G getline

#define SZ size()

#define IN insert

#define C clear()

#define B begin()

#define F front()

#define T top()

#define E end()

#define EM empty()

#define V vector

#define Q queue

#define DQ deque

#define PQ priority_queue

#define ST stack

#define FI first

#define SE second

#define PI acos(-1)

#define PS push

#define PP pop()

#define PSF push_front

#define PSB push_back

#define PPF pop_front()

#define PPB pop_back()

#define endl "\n"

#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

V<LL>v;

int main()

{

    FAST;

    LL n,m,i,j,k,p,q,o,l,s,t,z;

    string a,b;

    cin>>n;

    for(i=0;i<n;i++)

    {

        cin>>o;

        v.PSB(o);

    }

    k=0;

    l=0;

    for(i=0;i<n-1;i++)

    {

        if(v[i]>=v[i+1])

        {

            l++;

        }

        else

        {

            k=max(l,k);

            l=0;

        }

    }

     k=max(l,k);



    cout<<k<<endl;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;

int b[100006] ={0};

int main()

{

    int n,a[100006],mx=0,cnt=0,sum=0,k=0,no=0;

    cin>>n;

    memset(b,0,sizeof(b));

    for(int i=0;i<n;i++){

        scanf("%d",&a[i]);

    }



    for(int i=1;i<n;i++){

        if(a[i-1]>=a[i]){

            no=b[k];

            no++;

            b[k]=no;

        }else{

            k++;

            no=0;

           

        }

    }

    for(int j=0;j<=k;j++){

        if(mx<b[j]){

            mx=b[j];

        }

    }

    cout<<mx<<endl;

   





    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4106392621111246x):
#include<bits/stdc++.h>

using namespace std;

map<int,int>mp;

map<char,int>::iterator it;

  vector<int>v;

int main()

{

  int n,a,mx=0,c=0,b;

  cin>>n;

  for(int i=0;i<n;i++)

  {

      cin>>a;



if(i!=0)

{

    if(b>=a){c++;}

    else{c=0;}



}

if(mx<c){mx=c;}

b=a;





  }





cout<<mx<<endl;



}