import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    }
} Main public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    } main {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    } Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int n=scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int height[] = new int[n]; height new int[n] n for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i height[i]=scanner.nextInt(); height[i]=scanner.nextInt() height[i] height i scanner.nextInt() scanner.nextInt scanner int max=0; max 0 int heightGreaterCount[] = new int[n]; heightGreaterCount new int[n] n heightGreaterCount[n-1] = 0 heightGreaterCount[n-1] heightGreaterCount n-1 n 1 0 for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        } int i = n-2; int i = n-2; i n-2 n 2 i >= 0 i 0 i-- i-- i {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        } {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        } if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            } height[i]>=height[i+1] height[i] height i height[i+1] height i+1 i 1 {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            } heightGreaterCount[i] = heightGreaterCount[i + 1] + 1 heightGreaterCount[i] heightGreaterCount i heightGreaterCount[i + 1] + 1 heightGreaterCount[i + 1] heightGreaterCount i + 1 i 1 1 max = Math.max(heightGreaterCount[i],max) max Math.max(heightGreaterCount[i],max) Math.max Math heightGreaterCount[i] heightGreaterCount i max System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int height[] = new int[n];

        for (int i = 0; i < n; i++)
            height[i]=scanner.nextInt();

        int max=0;
        int heightGreaterCount[] = new int[n];
        heightGreaterCount[n-1] = 0;
        for (int i = n-2; i >= 0; i--) {
            if(height[i]>=height[i+1]) {
                heightGreaterCount[i] = heightGreaterCount[i + 1] + 1;
                max = Math.max(heightGreaterCount[i],max);
            }
        }


        System.out.println(max);
    }
}