import java.io.*;
import java.util.*;

public class Main
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new Main().go();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new Main().go();
    }
} Main PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) StringTokenizer tok; tok public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    } go {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    } ntok() ntok int n = ipar(); n ipar() ipar int[] arr = new int[n]; arr new int[n] n ntok() ntok for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            arr[i] = ipar();
        } {
            arr[i] = ipar();
        } arr[i] = ipar() arr[i] arr i ipar() ipar int prev = arr[0]; prev arr[0] arr 0 int count = 1; count 1 int best = 1; best 1 for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        } {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        } if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            } arr[i] > prev arr[i] arr i prev {
                count = 1;
            } count = 1 count 1 {
                count++;
            } count++ count best = Math.max(count, best) best Math.max(count, best) Math.max Math count best prev = arr[i] prev arr[i] arr i out.println(best-1) out.println out best-1 best 1 out.flush() out.flush out in.close() in.close in public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    } ntok {
        tok = new StringTokenizer(in.readLine());
    } tok = new StringTokenizer(in.readLine()) tok new StringTokenizer(in.readLine()) public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    } ipar {
        return Integer.parseInt(tok.nextToken());
    } return Integer.parseInt(tok.nextToken()); Integer.parseInt(tok.nextToken()) Integer.parseInt Integer tok.nextToken() tok.nextToken tok public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    } lpar {
        return Long.parseLong(tok.nextToken());
    } return Long.parseLong(tok.nextToken()); Long.parseLong(tok.nextToken()) Long.parseLong Long tok.nextToken() tok.nextToken tok public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    } dpar {
        return Double.parseDouble(tok.nextToken());
    } return Double.parseDouble(tok.nextToken()); Double.parseDouble(tok.nextToken()) Double.parseDouble Double tok.nextToken() tok.nextToken tok public String spar()
    {
        return tok.nextToken();
    } spar {
        return tok.nextToken();
    } return tok.nextToken(); tok.nextToken() tok.nextToken tok public static void main(String[] args) throws IOException
    {
        new Main().go();
    } main {
        new Main().go();
    } new Main().go() new Main().go new Main() String[] args args public class Main
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new Main().go();
    }
} public class Main
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new Main().go();
    }
} Main
import java.io.*;
import java.util.*;

public class Main
{
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer tok;

    public void go() throws IOException
    {
        ntok();
        int n = ipar();
        int[] arr = new int[n];
        ntok();
        for (int i = 0; i < n; i++)
        {
            arr[i] = ipar();
        }
        int prev = arr[0];
        int count = 1;
        int best = 1;
        for (int i = 1; i < n; i++)
        {
            if (arr[i] > prev)
            {
                count = 1;
            }
            else
            {
                count++;
            }
            best = Math.max(count, best);
            prev = arr[i];
        }
        out.println(best-1);

        out.flush();
        in.close();
    }

    public void ntok() throws IOException
    {
        tok = new StringTokenizer(in.readLine());
    }

    public int ipar()
    {
        return Integer.parseInt(tok.nextToken());
    }

    public long lpar()
    {
        return Long.parseLong(tok.nextToken());
    }

    public double dpar()
    {
        return Double.parseDouble(tok.nextToken());
    }

    public String spar()
    {
        return tok.nextToken();
    }

    public static void main(String[] args) throws IOException
    {
        new Main().go();
    }
}
