import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    } main {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int[] heights = new int[N + 1]; heights new int[N + 1] N + 1 N 1 for (int i = 0; i < N; i++) heights[i] = in.nextInt(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i heights[i] = in.nextInt(); heights[i] = in.nextInt() heights[i] heights i in.nextInt() in.nextInt in heights[N] = Integer.MAX_VALUE heights[N] heights N Integer.MAX_VALUE Integer Integer.MAX_VALUE int res = 0 res 0 i = 0 i 0 j = 1; j 1 while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        } j < N + 1 j N + 1 N 1 {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        } if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            } heights[j] <= heights[j - 1] heights[j] heights j heights[j - 1] heights j - 1 j 1 {
                j++;
            } j++ j {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            } res = Math.max(res, j - i - 1) res Math.max(res, j - i - 1) Math.max Math res j - i - 1 j - i - 1 j i 1 i = j i j j++ j System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
        int[] heights = new int[N + 1];
        for (int i = 0; i < N; i++) heights[i] = in.nextInt();
        heights[N] = Integer.MAX_VALUE;

        int res = 0, i = 0, j = 1;
        while(j < N + 1) {
            if (heights[j] <= heights[j - 1]) {
                j++;
            } else {
                res = Math.max(res, j - i - 1);
                i = j;
                j++;
            }
        }
        System.out.println(res);
    }
}
