import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long a[]=new long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    int c =0;int ans=0;
    for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    }
    System.out.println(ans);
  }
}
     import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long a[]=new long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    int c =0;int ans=0;
    for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    }
    System.out.println(ans);
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long a[]=new long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    int c =0;int ans=0;
    for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long a[]=new long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    int c =0;int ans=0;
    for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long a[]=new long[n]; a new long[n] n for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      a[i]=sc.nextLong();
    } {
      a[i]=sc.nextLong();
    } a[i]=sc.nextLong() a[i] a i sc.nextLong() sc.nextLong sc int c =0; c 0 int ans=0; ans 0 for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    } int i=0; int i=0; i 0 i<n-1 i n-1 n 1 i++ i++ i {
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    } {
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    } if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0; a[i]>=a[i+1] a[i] a i a[i+1] a i+1 i 1 {
        
        c++;
        if(c>ans) ans=c;
      } c++ c if(c>ans) ans=c; c>ans c ans ans=c ans c c=0 c 0 System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;
class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    long a[]=new long[n];
    for(int i=0;i<n;i++){
      a[i]=sc.nextLong();
    }
    int c =0;int ans=0;
    for(int i=0;i<n-1;i++){
      if(a[i]>=a[i+1]){
        
        c++;
        if(c>ans) ans=c;
      }
      else
        c=0;
    }
    System.out.println(ans);
  }
}
    
