CodeEff/ECCO huggingface dataset:
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))

current_height = h[0]
current_count = 0
max_count = current_count
for i in range(1, n):
    if current_height >= h[i]:
        current_count += 1
    else:
        max_count = max(current_count, max_count)
        current_count = 0
    current_height = h[i]

max_count = max(current_count, max_count)
print(max_count)


# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))

count = 0
max_value = 0
for i in range(n)[1::]:
    if h[i-1] >= h[i]:
        count += 1
    else:
        max_value = max(max_value, count)
        count = 0
max_value = max(max_value, count)
print(max_value)
# Original solution
N = int(eval(input()))
H = input().split()

for i in range(N):
  H[i] = int(H[i])

Cnt = 0
MaxCnt = 0

if (N == 1):
  print((0))
else:
  for i in range(N-1):
    Cnt = 0
    for j in range(i, N-1, 1):
      if (H[j] >= H[j+1]):
        Cnt += 1
      else:
        break
    MaxCnt = max(Cnt, MaxCnt)
  print(MaxCnt)

# Optimized solution
N = int(eval(input()))
H = input().split()

for i in range(N):
  H[i] = int(H[i])

Cnt = 0
MaxCnt = 0

if (N == 1):
  print((0))
else:
  i = 0
  while(i < N-1):
    Cnt = 0
    for j in range(i, N-1, 1):
      if (H[j] >= H[j+1]):
        Cnt += 1
        if (j == N-2):
          i = j+1
      else:
        i = j+1
        break
    MaxCnt = max(Cnt, MaxCnt)
  print(MaxCnt)
# Original solution
# -*- coding: utf-8 -*-

def main():
    N=int(eval(input()))  #数値入力 「N」だけの入力のとき
    H=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
    D=list()
    for i in range(1, N):
        if H[i-1] >= H[i]:
            D.append(1)
        else:
            D.append(0)
    #print("D")
    #print(D)

    ans = 0
    a = 0
    D = tuple(D)
    for i in range(len(D)):
        a = 0
        for j in range(i, len(D)):            
            if D[j] == 1:
                a += 1
                if a > ans:
                    ans = a
            else:
                if a > ans:
                    ans = a
                break
            #print("i j")
            #print(str(i) +" "+str(j) +" "+str(ans))
    print(ans)

if __name__ == '__main__':
    main()

# Optimized solution
N = int(eval(input()))
H = [int(x) for x in input().split()]
ans = 0
cnt = 0
for ind,i in enumerate(H[:-1]):
    if(i>=H[ind+1]):
        cnt += 1
    else:
        cnt = 0
    ans = max(ans,cnt)
print(ans)
# Original solution
N = eval(input())
N = int(N)

l = input().split(" ")
l = [int(n0) for n0 in l]

# print(l)

l.append(10**10)

ans = 0

for xi in range(N-1):
    step = l[xi]
    count = 0
    while l[xi+count] >= l[xi+count+1] :
        # step = l[xi+count+1]
        count = count +1
    if ans < count:
        ans = count

print(ans)


# Optimized solution
n = int(eval(input()))
h = [int(xi) for xi in input().split()]

step = 0
mstep = 0
for xi in range(n-1):
    if h[xi] >= h[xi+1]:
        step += 1
    else:
        if mstep<step:
            mstep = step
        step = 0

if mstep<step:
    mstep = step

print(mstep)
# Original solution
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
cnt, ans = -1, 0
for h in H:
  if h <= last_h:
    cnt += 1
  else:
    ans = max(ans, cnt) # update
    cnt = 0 # reset
  last_h = h
ans = max(ans, cnt)
print(ans)

# Optimized solution
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
  if last_h >= h:
    cnt += 1
  else:
    ans = max(ans, cnt)
    cnt = 0
  last_h = h
print((max(ans, cnt)))
# Original solution
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
  if last_h >= h:
    cnt += 1
  else:
    if ans < cnt:
      ans = cnt
    cnt = 0
  last_h = h
print((ans if ans > cnt else cnt))

# Optimized solution
N = eval(input())
H = list(map(int, input().split()))
last_h = float('inf')
ans, cnt = 0, -1
for h in H:
  if last_h >= h:
    cnt += 1
  else:
    if cnt > ans:
      ans = cnt
    cnt = 0
  last_h = h
print((ans if ans > cnt else cnt))
# Original solution
n = int(eval(input()))
H = list(map(int, input().split()))

ans = 0
for i in range(n):
    pos_h = H[i]
    count = 0
    for j in range(i + 1, n):
        if H[j] <= pos_h:
            count += 1
            pos_h = H[j]
        else:
            break
    ans = max(ans, count)

print(ans)

# Optimized solution
n = int(eval(input()))
H = list(map(int, input().split()))

ans = 0
i = 0
while i < n:
    pos_h = H[i]
    count = 0
    j = i + 1
    while j < n and H[j] <= pos_h:
        count += 1
        pos_h = H[j]
        j += 1

    ans = max(ans, count)
    i = j

print(ans)
# Original solution
N=int(eval(input()))
H=[int(x) for x in input().split()]
A=''
for i in range(N-1):
  if H[i] >= H[i+1]:
    A += 'o'
  else:
    A +='x'
for j in range(1,N):
  if 'o'*(N-j) in A:
    print((N-j))
    exit()
print('0')

# Optimized solution
N=int(eval(input()))
H=[int(x) for x in input().split()]
answer = 0
count = 0
for i in range(N-1):
  if H[i]>=H[i+1]:
    count +=1
    answer = max(answer,count)
  else:
    count=0
print(answer)
# Original solution
n = int(eval(input()))
line2 = input().split()
h_list = [int(x) for x in line2]
 
max_count = 0
size = len(h_list)

for i in range(size):
    now = h_list[i]
    count = 0
    for j in range(i+1,size):
        if now >= h_list[j]:
            count += 1
            now = h_list[j]
        else:
            break
        
    if max_count < count:
        max_count = count

print(max_count)

# Optimized solution
n = int(eval(input()))
line2 = input().split()
h_list = [int(x) for x in line2]
 
max_count = 0
size = len(h_list)

i = 0
while True: 
    if i == size-1:
        break
    now = h_list[i]
    count = 0
    for j in range(i+1,size):
        if now >= h_list[j]:
            count += 1
            now = h_list[j]
        else:
            break
    if max_count < count:
        max_count = count
        
    if max_count >= size - i:
        break
        
    i = j
    
print(max_count)
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
total = 0
max_total = 0

for i in range(N-1):
    if H[i] >= H[i+1]:
        total += 1
        max_total = max(max_total, total)
    else:
        total = 0

print(max_total)

# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))
total = 0
max_total = 0

for i in range(n-1):
    if h[i] >= h[i+1]:
        total += 1
        max_total = max(max_total, total)
    else:
        total = 0

print(max_total)
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))

maxcnt=0
for i in range(n):
    cnt=0
    for j in range(i+1,n-1):
        if h[j+1] <= h[j]:
            cnt +=1
        else:
            break
    if cnt>maxcnt:
        maxcnt=cnt
print(maxcnt)

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))

maxcnt=0
st=0
while st < n-1:
    cnt=0
    j=st
    while j < n-1:
        if h[j+1] <= h[j]:
            cnt +=1
            j += 1
        else:
            break
    if cnt>maxcnt:
        maxcnt=cnt
    st = j+1

print(maxcnt)
# Original solution
# 標準入力
N = int(eval(input()))
H = list(map(int, input().split()))
H.append(10**10)
count = [0 for i in range(N)]
# 左からi番目に降り立って(iは0~N-1)
for i in range(N):
# H[i] >= H[i+1] ならcount[i]を一つ増やしてiに足していけ(H[N] = 10**10としよう)
  while H[i] >= H[i+1]:
    count[i] += 1
    i += 1
#max(count)を出力しよう
print((max(count)))


# Optimized solution
# 標準入力
N = int(eval(input()))
H = list(map(int, input().split()))
H.append(10**10)
count = [0 for i in range(N)]
i = 0
# 左からi番目に降り立って(iは0~N-1)、H[i]>=H[i+1]が続くまでcountを増やす。count[i]=5なら次はi+6から繰り返す
while i <= N-1:
  j = i
  while H[j] >= H[j+1]:
    count[i] += 1
    if j <= N-3:
      j += 1
    else:
      break
  i += count[i]+1
#max(count)を出力しよう
print((max(count)))
# Original solution
n = int(eval(input()))
H = list(map(int, input().split()))

def f(X):
  i = 0
  while True:
    if i == len(X)-1:
      return(i)
      break
    elif X[i] < X[i+1]:
      return(i)
      break
    else:
      i += 1
  
X = H
ANS = []
while True:
  if X == []:
    print((max(ANS)))
    exit()
  else:
    ANS.append(f(X))
    x = f(X)
    X = X[x+1:n]

# Optimized solution
n = int(eval(input()))
H = list(map(int, input().split()))
c = 0
ans = 0
for i in range(1,n):
    if H[i]<=H[i-1]:
        c +=1
    else:
        c = 0
    ans = max(ans,c)
print(ans)
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))
n = 0
a = 0

for i in range(N-1):
  if H[i+1]<=H[i]:
    n+=1
  else:
    a=max(a,n)
    n=0

print((max(a,n)))

# Optimized solution
N = int(eval(input()))
H = list(map(int,input().split()))
ans = [0]

for h1,h2 in zip(H,H[1:]):
  if h2<=h1:
    ans+=[ans[-1]+1]
  else:
    ans+=[0]

print((max(ans)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
count = 0

for i in range(N-1):
  moving = 0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      moving += 1
    else:
      i = j + 1
      break
      
    if moving > count:
      count = moving
      
print(count)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
count = 0
i = 0

while i < N-1:
  moving = 0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      moving += 1
    else:
      i = j + 1
      break
      
    if moving > count:
      count = moving
      
    i += 1
      
print(count)
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
for i in range(n):
    cnt = 0
    for j in range(i,n-1):
        if h[j] >= h[j+1]:
            cnt += 1
        else:
            break
    ans = max(ans,cnt)
print(ans)

# Optimized solution
n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
cnt = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        cnt += 1
    else:
        cnt = 0
    ans = max(ans,cnt)
print(ans)
# Original solution
N = int(eval(input()))
Hlist = list(map(int, input().split()))
now = Hlist[0]
ans = 0
num = 0
for i in range(N - 1):
    if Hlist[i + 1] <= now:
        num += 1
    else:
        ans = max(ans, num)
        num = 0
    now = Hlist[i + 1]
    # print(ans, num)
print((max(ans, num)))


# Optimized solution
N = int(eval(input()))
Hlist = list(map(int, input().split()))
ans = 0
c = 0
now = Hlist[0]
for next_step in Hlist[1:]:
    if next_step <= now:
        c += 1
    else:
        ans = max(ans, c)
        c = 0
    now = next_step
ans = max(ans, c)

print(ans)
# Original solution
#C
n = int(eval(input()))
h = list(map(int,input().split()))
tmp = 0
prev = True
result = [0 for _ in range(n)]

for i in range(n-1):
    if prev:
        for j in range(i,n-1):
            if h[j] >= h[j+1]:
                tmp += 1
            else:
                break
    if tmp > 0:
        prev = False
    else:
        prev = True
        
    result[i] = tmp
    tmp = 0
    
print((max(result)))
            

# Optimized solution
#C
n = int(eval(input()))
h = list(map(int,input().split()))

a,b = 0,0

for i in range(n-1):
    if h[i] >= h[i+1]:
        a += 1
        b = max(b,a)
    else:
        a = 0
        
print(b)
# Original solution
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(eval(input()))
hn = list(map(int, input().split()))

max_move = 0

for i in reversed(list(range(1, N))):
    move = 0
    for j in reversed(list(range(1, i+1))):
        if hn[j-1] >= hn[j]:
            move += 1
        else:
            break
    if move >= max_move:
        max_move = move
print(max_move)


# Optimized solution
#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(eval(input()))
hn = list(map(int, input().split()))

max_move = 0
move = 0

for i in reversed(list(range(1, N))):
    if hn[i-1] >= hn[i]:
        move += 1
    else:
        if move >= max_move:
            max_move = move
        move = 0
if move >= max_move:
    max_move = move
print(max_move)
# Original solution
n = int(eval(input()))
h = [int(x) for x in input().split(' ')]

a = 0
for c in range(n) :
    cnt = 0
    z = h[c]
    for d in range(c+1,n) :
        if (z >= h[d]) :
            cnt += 1
            z = h[d]
        else :
            break
    if a < cnt :
        a = cnt

print(a)

# Optimized solution
n = int(eval(input()))
h = [int(x) for x in input().split(' ')]

cnt = 0
a = 0
for c in range(n-1) :
    if (h[c] >= h[c+1]) :
        cnt += 1
    else :
        if a < cnt :
            a = cnt
        cnt = 0

if a < cnt :
    a = cnt


print(a)
# Original solution
N = int(eval(input()))
H = [int(h) for h in input().split()]
H.append(1e10)
dH = [H[i + 1] - H[i] for i in range(N)]
m, c = 0, 0
for i in range(N):
    d = H[i + 1] - H[i]
    if d <= 0:
        c += 1
    else:
        if c > m:
            m = c
        c = 0
print(m)

# Optimized solution
N = int(eval(input()))
H = [int(h) for h in input().split()]
H.append(1e10)
m, c = 0, 0
for i in range(N):
  d = H[i + 1] - H[i]
  if d <= 0:
    c += 1
  else:
    if c > m:
      m = c
    c = 0
print(m)
# Original solution
f = int(eval(input()))
ls = [int(x) for x in input().split()]
a = c = max1 =0
for k in range(0, len(ls)-1):
    for a in range(k, f-1):
        if ls[a] < ls[a + 1]:
            break
        c = c + 1
    if c > max1:
        max1 = c
    c = 0
print(max1)

# Optimized solution
f = int(eval(input()))
ls = [int(x) for x in input().split()]
a = c = max1 = k =0
while k < len(ls)-1:
    for a in range(k, len(ls)-1):
        if ls[a] < ls[a + 1]:
            break
        c = c + 1
    if c > max1:
        max1 = c
    k = a + 1
    c = 0
print(max1)
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

max = 0
for i in range(N):
    count = 0
    for j in range(i, N-1):
        if H[j] >= H[j+1]:
            count += 1
        else:
            break
    if count > max:
        max = count

print(max)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

max = 0
i = 0
while N > i:
    count = 0
    j = i
    while N-1 > j:
        if H[j] >= H[j+1]:
            count += 1
            j += 1
        else:
            break
    if count > max:
        max = count
    i = j+1

print(max)
# Original solution
def main():
    H = [int(i) for i in open(0).read().split()[1:]]
    ans = 0
    tmp = 0
    for h1, h2 in zip(H[:-1], H[1:]):
        if h1 >= h2:
            tmp += 1
        else:
            ans = max(ans, tmp)
            tmp = 0
    ans = max(ans, tmp)
    print(ans)
    return


main()


# Optimized solution
def main():
    H = [int(i) for i in open(0).read().split()[1:]]
    ans = 0
    tmp = 0
    for h1, h2 in zip(H[:-1], H[1:]):
        if h1 >= h2:
            tmp += 1
        else:
            if ans < tmp:
                ans = tmp
            tmp = 0
    if ans < tmp:
        ans = tmp
    print(ans)
    return


main()
# Original solution
def main():
    H = open(0).read().split()[1:]
    ans = 0
    tmp = 0
    for h1, h2 in zip(H[:-1], H[1:]):
        if int(h1) >= int(h2):
            tmp += 1
        else:
            if ans < tmp:
                ans = tmp
            tmp = 0
    if ans < tmp:
        ans = tmp
    print(ans)
    return


main()


# Optimized solution
def main():
    eval(input())
    H = list(map(int, input().split()))
    ans = 0
    prev = float('inf')
    cnt = -1
    for cur in H:
        if prev >= cur:
            cnt += 1
        else:
            if ans < cnt:
                ans = cnt
            cnt = 0
        prev = cur
    if ans < cnt:
        ans = cnt
    print(ans)
    return


main()
# Original solution
n=int(eval(input()))
inf=10*100
h=list(map(int,input().split()))+[inf]
n=len(h)
length=[0]*(n-1)+[1]
cnt=[]
move=0
for i in range(n-1):
    if h[i]<h[i+1]:
        length[i+1]=1
        if i==0:
            length[i]=1
for i in range(1,n):
    if length[i]==0:
        move+=1
    else:
        cnt.append(move)
        move=0
if len(cnt)==0:
    print((n-2))
else:
    print((max(cnt)))

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))
cnt=[]
move=0
for i in range(n-1):
    if h[i]>=h[i+1]:
        move+=1
    else:
        cnt.append(move)
        move=0
cnt.append(move)
print((max(cnt)))
# Original solution
N = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, N):
    if h[i] <= h[i - 1]:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
ans = max(ans, cnt)

print(ans)


# Optimized solution
n = int(eval(input()))
height = list(map(int, input().split()))
ans = 0
cnt = 0
for i in range(1, n):
    if height[i] > height[i - 1]:
        cnt = 0
    else:
        cnt += 1
    ans = max(ans, cnt)

print(ans)
# Original solution
# -*- coding: utf-8 -*-
n = int(eval(input()))
h = input().split()
for i in range(n):
  h[i] = int(h[i])

ans = 0
for i in range(n-1):
  tmp = 0
  i_tmp = i
  while(i_tmp<n-1):
    if h[i_tmp+1]>h[i_tmp]:
      break
    i_tmp += 1
    tmp += 1
  if tmp > ans:
    ans = tmp
  i += 1
  
print(ans)

# Optimized solution
# -*- coding: utf-8 -*-
n = int(eval(input()))
h = input().split()
for i in range(n):
  h[i] = int(h[i])

ans = 0
i = 0
while(i < n-1):
  tmp = 0
  i_tmp = i
  while(i_tmp<n-1):
    if h[i_tmp+1]>h[i_tmp]:
      break
    i_tmp += 1
    tmp += 1
  if tmp > ans:
    ans = tmp
  i += tmp+1
  
print(ans)
# Original solution
N = int(eval(input())) #マスの数
H = list(map(int,input().split())) #各マスの高さ

#リストのソートと添字の紐付け
H_sort = []
for i in range(len(H)):
  	a = [H[i],i]
  	H_sort.append(a)
H_sort.sort(reverse=True)

max_move = 0 #移動距離の最大値
for n in range(0,len(H)):
  move = 0
  i = H_sort[n][1]
  if i <= N-2 and max_move < N-1-i:
    while(i <= N-2 and H[i]>=H[i+1]):
      move += 1
      i += 1
    if max_move <= move:
      max_move = move
print(max_move)


# Optimized solution
N = int(eval(input())) #マスの数
H = list(map(int,input().split())) #各マスの高さ

move  = 0
max_move = 0

for i in range(N-1):
  if H[i] >= H[i+1]:
    move += 1
    if max_move <= move:
      max_move = move
  else:
    move = 0
print(max_move)
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
L = 0
count = 0
for i in range(N):
    if L >= H[i]:
        count += 1
    else:
        ans = max(ans, count)
        count = 0
    L = H[i]
ans = max(ans, count)
print(ans)


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


N = int(eval(input()))
H = LI()
ans = 0
count = 0
for i in range(1, N):
    if H[i-1] >= H[i]:
        count += 1
    else:
        ans = max(ans, count)
        count = 0
print((max(ans, count)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

dp = [0]*N

for i in range(1, N):
    if H[i-1] >= H[i]:
        dp[i] = dp[i-1] + 1
print((max(dp)))



# Optimized solution
N = int(eval(input()))
H = list(map(int,input().split()))

dp = [0] * (N+1)
dp[0] = 0
for i in range(1, N):
    if H[i] <= H[i-1]:
        dp[i+1] = dp[i] + 1
print((max(dp)))
# Original solution
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N=II()
H=LI()

ans=0

for i in range(N):
    tmp=0
    while i+1<N:
        if H[i]>=H[i+1]:
            tmp+=1
            i+=1
        else:
            break
            
    ans=max(ans,tmp)
print(ans)


# Optimized solution
import sys
import math
from collections import Counter
import itertools
import fractions
#from functools import reduce

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")

# ###########################################
 
N=II()
H=LI()

ans=0
tmp=0
current=H[0]

for i in range(1,N):
    if current >= H[i]:
        tmp+=1
    else:
        ans=max(ans,tmp)
        tmp=0
    current=H[i]

print(max(ans,tmp))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

ans = 0
for i in range(N-1):
    tmp = 0
    for j in range(i, N-1):
        if H[j] >= H[j+1]:
            tmp += 1
        else: 
            break
    ans = max(ans, tmp)
print(ans)    

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))

ans = 0
cnt = 0

for i in range(N-1):
    if H[i] >= H[i+1]:
        cnt += 1
    else:
        if ans < cnt:
            ans = cnt
        cnt = 0    
if ans < cnt:
    ans = cnt
print(ans)
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))

dp = [0] * n

for i in range(len(h)-1):
  cnt = 0
  for j in range(i,len(h)-1):
    if h[j] < h[j+1]:
      dp[i] = cnt
      break
    cnt += 1
    dp[i] = cnt

print((max(dp)))

# Optimized solution
n = int(eval(input()))
h = list(map(int,input().split()))
cnt = 0
ans = 0
for i in reversed(list(range(1,len(h)))):
  if h[i-1] >= h[i] :
    cnt +=1
  else:
    ans = max(ans,cnt)
    cnt = 0
  if i == 1 :
    ans = max(ans,cnt)
  
print(ans)
# Original solution
N=int(eval(input()))
H=[int(s) for s in input().split()]

count_max=0
for j in range(N):
    count=0
    for i in range(j,N-1):
        if H[i]-H[i+1] >= 0:
            count+=1
        else:
            break
    if count > count_max:
        count_max=count
        X=j

print(count_max)

# Optimized solution
N=int(eval(input()))
H=[int(s) for s in input().split()]

count_max=0
count=0
for i in range(N-1):
    if H[i]-H[i+1] >= 0:
        count+=1
        if count > count_max:
            count_max=count
    else:
        count=0

print(count_max)
# Original solution
#

import sys
input=sys.stdin.readline

def main():
    N=int(eval(input()))
    H=list(map(int,input().split()))
    maxc=0
    for i in range(N-1):
        cnt=0
        while(i+1<=N-1 and H[i+1]<=H[i]):
            cnt+=1
            i+=1
        maxc=max(maxc,cnt)
    print(maxc)
    
if __name__=="__main__":
    main()


# Optimized solution
#

import sys
input=sys.stdin.readline

def main():
    N=int(eval(input()))
    H=list(map(int,input().split()))
    H=H[::-1]
    cnt=[0]*N
    for i in range(1,N):
        if H[i]>=H[i-1]:
            cnt[i]=cnt[i-1]+1
    print((max(cnt)))
    
    
    
if __name__=="__main__":
    main()
# Original solution
#!/usr/bin/env python3
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
for i in range(n):
    tmp = 0
    for j in range(i, n - 1):
        if h[j] < h[j + 1]:
            tmp = 0
        else:
            tmp += 1
        ans = max(ans, tmp)
print(ans)


# Optimized solution
#!/usr/bin/env python3
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 0
tmp = 0
for i in range(n - 1):
    if h[i] < h[i + 1]:
        tmp = 0
    else:
        tmp += 1
    ans = max(ans, tmp)
print(ans)