import core.bitop, std.bitmanip;
import core.checkedint;
import std.algorithm, std.functional;
import std.array, std.container;
import std.bigint;
import std.conv;
import std.math, std.numeric;
import std.range, std.range.interfaces;
import std.stdio, std.string;
import std.typecons;

void main()
{
    int n;
    readf("%s", &n);
    readln;
    
    auto arr = readln.chomp.split.map!(to!int).array;
    
    int ans = 0, cur = 0;
    foreach (i; 1 .. n) {
        if (arr[i] <= arr[i-1]) { ++cur; }
        else { cur = 0; }
            
        ans = max(ans, cur);
    }
    
    ans.writeln;
}