N=int(eval(input()))

H=list(map(int,input().split()))



ans=0

temp=0

for i in range(N-1):

    if H[i+1]<=H[i]:

        temp+=1

        ans=max(ans,temp)

    else:

        temp=0

print(ans)
import sys

input = sys.stdin.readline



def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))



def main():

    mod=10**9+7

    N=I()

    a=LI()+[10**10]

    ans=0

    now=-1

    cnt=0

    for i in range(N+1):

        if a[i]>now:

            ans=max(ans,cnt)

            cnt=0

        else:

            cnt+=1

        now=a[i]

        

    print(ans)

        



main()

N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
temp = 0
for i in range(N - 1):
    if H[i + 1] <= H[i]:
        temp += 1
        ans = max(ans, temp)
    else:
        temp = 0
print(ans)

import sys

input = sys.stdin.readline


def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def main():
    mod = 10**9 + 7
    N = I()
    a = LI() + [10**10]
    ans = 0
    now = -1
    cnt = 0
    for i in range(N + 1):
        if a[i] > now:
            ans = max(ans, cnt)
            cnt = 0
        else:
            cnt += 1
        now = a[i]
    print(ans)


main()

-N = int(eval(input())) -H = list(map(int, input().split())) -ans = 0 -temp = 0 -for i in range(N - 1): -    if H[i + 1] <= H[i]: -        temp += 1 -        ans = max(ans, temp) -    else: -        temp = 0 -print(ans) +import sys + +input = sys.stdin.readline + + +def I(): +    return int(eval(input())) + + +def MI(): +    return list(map(int, input().split())) + + +def LI(): +    return list(map(int, input().split())) + + +def main(): +    mod = 10**9 + 7 +    N = I() +    a = LI() + [10**10] +    ans = 0 +    now = -1 +    cnt = 0 +    for i in range(N + 1): +        if a[i] > now: +            ans = max(ans, cnt) +            cnt = 0 +        else: +            cnt += 1 +        now = a[i] +    print(ans) + + +main()