CodeEff/ECCO huggingface dataset:
# Original solution
N=int(eval(input()))
H=list(map(int, input().split()))
Max=0
count=0
for i in range(N):
  count=0
  for j in range(N - i - 1):
    if H[i + j] >= H[i + j + 1]:
      count+=1
    else:
      count=0
    if Max < count:
      Max = count
print(Max)

# Optimized solution
N=int(eval(input()))
H=list(map(int, input().split()))
Max=0
count=0
index=0
for i in range(1,N):
  if H[index] >= H[i]:
    count+=1
    index+=1
  else:
    count=0;
    index = i
  if Max < count:
    Max = count
print(Max)
# Original solution
N=int(eval(input()))
H = list(map(int, input().split()))
I=[H[i]-H[i+1] for i in range(N-1)]
K=[]
for j in range(N-1):
  if I[j]>=0:
    K.append("a")
  else:
    K.append("b")
S = ''.join(K)
i=0
while "a"*(i+1) in S:
  i+=1
print(i)

# Optimized solution
N=int(eval(input()))
H = list(map(int, input().split()))
I=[H[i]-H[i+1] for i in range(N-1)]
a=0
n=0
j=0
while j<N-1:
  if I[j]>=0:
    j+=1
    n+=1
  else:
    j+=1
    a=max(n,a)
    n=0
a=max(n,a)
print(a)
# Original solution
N, *H = list(map(int, open(0).read().split()))
diff = [H[i + 1] - H[i] <= 0 for i in range(N - 1)]

ans = 0
tmp = 0
for v in diff:
    if v:
        tmp += 1
    else:
        ans = max(ans, tmp)
        tmp = 0
        

print((max(ans, tmp)))


# Optimized solution

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

ans = 0
cnt = 0
cur = X[0]
for i in range(1, N):
    if cur < X[i]:
        ans = max(ans, cnt)
        cnt = 0
    else:
        cnt += 1
    cur = X[i]

print((max(ans, cnt)))
# Original solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(eval(input()))
    hl=list(map(int,input().split()))
    cntmax=0
    #スタート位置
    for i in range(n):
        #右に移動
        cnt = 0
        for j in range(i,n-1):
            if hl[j] >= hl[j+1]:
                cnt+=1
                if cnt==n-1-i:
                    cntmax=max(cnt,cntmax)
            else:
                cntmax=max(cnt,cntmax)
                break
    print(cntmax)
resolve()

# Optimized solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(eval(input()))
    l=list(map(int,input().split()))
    cnt=0
    cntmax=0
    for i in range(n-1):
        if l[i]>=l[i+1]:
            cnt+=1
            cntmax=max(cnt,cntmax)
        else:
            cntmax=max(cnt,cntmax)
            cnt=0
    print(cntmax)
resolve()
# Original solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(eval(input()))
    l=list(map(int,input().split()))
    cnt=0
    cntmax=0
    for i in range(n-1):
        if l[i]>=l[i+1]:
            cnt+=1
            cntmax=max(cnt,cntmax)
        else:
            cntmax=max(cnt,cntmax)
            cnt=0
    print(cntmax)
resolve()

# Optimized solution
def resolve():
    n=int(eval(input()))
    l=list(map(int,input().split()))
    # 「次のマス以上」が今何回続いているか
    cnt=0
    # 「次のマス以上」が最高で何回続いたか
    cntmax=0
    for i in range(n-1):
        if l[i]>=l[i+1]:
            # 「次のマス以上」だったらcntを増やして、次より大きいが何回続いているかを記録
            cnt+=1
            if i==n-2:
                cntmax=max(cnt,cntmax)
        else:
            # 次のマス未満だったら、それまでのcntとcntmaxを比べてカウント最高値を記録する
            # cntを０にして振り出しに戻す
            cntmax=max(cnt,cntmax)
            cnt=0
    print(cntmax)
resolve()
# Original solution
N = int(eval(input()))
H = [int(i) for i in input().split()]
can_move_nums = [0] * N
start = 0

for now in range(N-1):
    if H[now+1] <= H[now]:
        for j in range(start, now+1):
            can_move_nums[j] += 1
    else:
        start = now
        
print((max(can_move_nums))) 

# Optimized solution
N = int(eval(input()))
H = [int(i) for i in input().split()]
H = H[::-1]
can_move_nums = [0] * N
start = 0

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

ans=0
right_is_max=True

for i in range(n-1,-1,-1):
    if right_is_max==True and i!=n-1:
        if h[i]<h[i+1]:
            right_is_max=False
        else:
            sec+=1
        
    else:    
        for j in range(i,n):
            if j==i:
                tmp=h[j]
                sec=0
            else:
                if tmp<h[j]:
                    break
                else:
                    tmp=h[j]
                    sec+=1
                
    ans=max(ans,sec)
            
print(ans)

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

ans=0

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

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

n = 0
A = 0

for i in range(N-1):
    if Hlist[i] >= Hlist[i+1]:
        n += 1
    else:
        A = max(A, n)
        n = 0
A = max(A, n)

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

def lower(i, H):
  cnt = 0
  while H[i] >= H[i+1]:
    cnt += 1; i += 1;
    if i+1 > N-1:
      break
  return cnt

ans = 0
for i in range(N-1):
  tmp = lower(i, H)
  ans = max(ans, tmp)
  i += tmp

print(ans)

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

def lower(i, H):
  cnt = 0
  while H[i] >= H[i+1]:
    cnt += 1; i += 1;
    if i+1 > N-1:
      break
  return cnt

ans, i = 0, 0
while i < N - 1:
  tmp = lower(i, H)
  ans = max(ans, tmp)
  i += tmp+1

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

count = [0]*(n-1)
j = 0
count2 = [0]*(n-2)

for i in range(n-1):
    if h[i] > h[i+1]:
        count[i] = 1
    if h[i] < h[i+1]:
        count[i] = 0
    if h[i] == h[i+1]:
        count[i] = 1

# print(count)
z = 0
for i in range(n-2):
    if count[i] == count[i+1] and count[i]==1:
        count2[j] += 1
        z = 1
    else:
        j += 1
if z == 1:
    print((max(count2)+1))
else:
    print('0')
    
        

    



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

top = 0

for i in range(N):
    challenge = True
    count = 0

    while challenge == True and i < N-1:
        if high[i] >= high[i+1]:
            count += 1
            if i < N-1:
                i += 1
        else:
            challenge = False
    
    if top < count:
        top = count

print(top)


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

top = 0
count = 0

for i in range(N):
    challenge = True
    
    if count > 0:
        count -= 1
    else:
        while challenge == True and i < N-1:
            if high[i] >= high[i+1]:
                count += 1
                if i < N-1:
                    i += 1
            else:
                challenge = False
        
        if top < count:
            top = count

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

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

# Optimized solution
n=int(eval(input()))
h= list(map(int,input().split()))
left=ans=0
for right in range(1,n-1):
  if h[right]>=h[right+1]:
    ans=max(ans,right-left+1)
  else:
    left=right+1
print(ans)
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))+[10**9+1]
ans=0
cnt=0
for i in range(1,n+1):
    if h[i-1]>=h[i]:
        cnt+=1
    else:
        ans=max(ans,cnt)
        cnt=0
print(ans)

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))
ans=0
t_ans=0
b_h=h[0]
for i in h[1:]:
  if b_h>=i:
    t_ans+=1
  else:
    ans=max(ans,t_ans)
    t_ans=0
  b_h=i
ans=max(ans,t_ans)
print(ans)
# Original solution
from sys import stdin
nii=lambda:list(map(int,stdin.readline().split()))
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(eval(input()))
h=lnii()

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

print((max(ans,t_ans)))

# Optimized solution
from sys import stdin
nii=lambda:list(map(int,stdin.readline().split()))
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(eval(input()))
h=lnii()+[10**10]

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

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

ans=0
posi=0
counter=0
while posi<N-1:
  if H[posi]>=H[posi+1]:
    counter+=1
    posi+=1
  else:
    if counter>ans:
      ans=counter
      
    counter=0
    posi+=1

if counter>ans:
  ans=counter
  
print((int(ans)))

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

count = []
current_count = 0
for x in range(N - 1):
    if H[x] >= H[x + 1]:
        current_count += 1
    else:
        count.append(current_count)
        current_count = 0
count.append(current_count)

print((max(count)))

# Optimized solution
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(eval(input()))
    H = [int(x) for x in input().split()]

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

    ans = max(ans, cnt)
    print(ans)


    

if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
a = []
for i in range(n):
    ans = 0
    for j in range(i+1, n):
        if h[j-1]>=h[j]:
            ans+=1
        else:
            break
    a.append(ans)
    ans = 0
a.sort(reverse=True)
print((a[0]))

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

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

print(max)


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

ans = 0
ctr = 0

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

    ans = max(ans, ctr)

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

count = [0]*n

for i in range(n):
#  print("i is", i,"=======")
  for j in range(i, n-1):
 #   print("h[j] is", h[j])
 #   print("h[j+1] is", h[j+1])
    if h[j] >= h[j + 1]:
      count[i] += 1
  #    print("count is",count)
    else:
      break

max_cnt = sorted(count, reverse = True)
print((max_cnt[0]))

  

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

maximum = 0
cnt = 0

for i in range(len(H)):
    k = H[i]
    res = H[i+1:]
    for j in res:
        if(j <= k):
            cnt += 1
            k = j
        else:
            break
        maximum = max(maximum,cnt)
        #if(max < cnt):
        #    max = cnt
    cnt = 0

print(maximum)

# Optimized solution
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]):
        #ans = max(ans,tmp)
        tmp = 0
    else:
        tmp += 1
    ans = max(ans,tmp)

print(ans)
# Original solution
n = int(eval(input()))
H = list(map(int, input().split()))
ans = 0
for i in range(n):
  if ans >= n-i-1:
    break
  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()))
TMP = []
ans = 0
for i in range(n-1):
  if H[i] >= H[i+1]:
    TMP.append(1)
  else:
    TMP.append(-1)
tmp = 0
for i in range(n-1):
  if TMP[i] == 1:
    tmp += 1
  else:
    ans = max(ans, tmp)
    tmp = 0
ans = max(ans, tmp)
print(ans)
# Original solution
n,*l=list(map(int,open(0).read().split()))
c=p=m=0
for i in l:
  c=(c+1)*(i<=p)
  m=max(m,c)
  p=i
print(m)

# Optimized solution
n,*l=list(map(int,open(0).read().split()))
c=p=m=0
for i in l: c=-~c*(i<=p); m=max(m,c); p=i
print(m)
# Original solution
import sys

N = int(eval(input()))

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

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

print(max)


# Optimized solution
import sys

N = int(eval(input()))

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

max = 0
count = 0
for i in range(N-1):
    if(H[i] >= H[i+1]):
        count = count+1
        if(max < count): max = count
    else:
        count = 0
print(max)
# Original solution
full_num = int(eval(input()))     
A = list(map(int, input().split()))  
move = 0
A_result = ""
for i in range(full_num-1):
   if  A[i] >= A[i+1]:
       A_result =A_result+"1"
   else:
       A_result =A_result+"0"
B = list(A_result.split("0"))
C = []
for i in B:
    C.append(len(i))
print((max(C)))

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

cnt =0
m =[]
if n !=1:
    for i in range(n - 1):
	    if h[i] >= h[i + 1]:
		    cnt += 1
		    if i == n - 2:
			    m.append(cnt)
	    else:
		    m.append(cnt)
		    cnt = 0
else:
	m.append(0)
print((max(m)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))
a = [0] * N

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

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

for i in range(N - 1):
  if H[i] >= H[i+1]:
    a[start] += 1
  else:
    start += 1

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

ans = max(ans, count)

print(ans)

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

ans = 0
count = 0
for i in range(n-1):
    if hn[i+1] <= hn[i]:
        count += 1
    else:
        ans = max(ans, count)
        count=0

ans = max(ans, count)

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

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

# Optimized solution
N = int(eval(input()))
arr = list(map(int, input().split()))
jump_flg = [0]*N

for i in range(N-1):
    if arr[i] >= arr[i+1]:
        jump_flg[i] =1

ans = 0
count = 0
for i in range(N):
    if jump_flg[i] == 1:
        count +=1
        if ans<count:
            ans =count
    else:
        count =0

print(ans)
# Original solution
N = int(eval(input()))

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

c = 0
max_c = 0

for i in range(N-1):
    for j in range(i+1,N):
        if H[i] < H[j]:
            break
        else:
            c += 1
            i += 1
    if max_c < c:
        max_c = c
    c = 0

print(max_c)

# Optimized solution
N = int(eval(input()))

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

c = 0
max_c = 0
i = 0

while i < N-1:
    j = i+1
    while j < N:
        if H[i] < H[j]:
            i = j
            break
        else:
            c += 1
            j += 1
            i += 1
    if max_c < c:
        max_c = c
    c = 0

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


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

count = 0
max_count = 0
pre_height = -1

for height in list(map(int, input().split())):
    if (pre_height < height):
        if (max_count < count):
            max_count = count
        count = 0
        pre_height = height
        
        continue
    
    count += 1
    pre_height = height

if (max_count < count):
    max_count = count

print(max_count)

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

count = 0
max_count = 0
pre_height = -1

for height in h_list:
    if (pre_height < height):
        if (max_count < count):
            max_count = count
        count = 0
        pre_height = height
        
        continue
    
    count += 1
    pre_height = height

if (max_count < count):
    max_count = count

print(max_count)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
max1 = 0
for i in range(n):
    now = i
    try1 = 0
    for l in range(n - i - 1):
        if h[now] >= h[now + 1]:
            now += 1
            try1 += 1
        else:
            if try1 > max1:
                max1 = try1
                break
        if now == n - 1:
            if try1 > max1:
                max1 = try1
            break
    if max1 == n - i:
        break
print(max1)

# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))
max1 = 0
count = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        count += 1
    else:
        count = 0
    if count > max1:
        max1 += 1
print(max1)
# Original solution
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))
sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    H = LIST()

    D = ""
    for i in range(N-1):
        if H[i] >= H[i+1]: D += "o"
        else: D += "x"

    ans = 0
    for i in range(1, N):
        if "o"*i in D: ans += 1
        else: break

    print(ans)


if __name__ == '__main__':
    main()


# Optimized solution
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))
sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    H = LIST()

    D = [0]
    idx = 0
    for i in range(N-1):
        if H[i] >= H[i+1]: D[idx] += 1
        else:
            idx += 1
            D.append(0)

    print((max(D)))


if __name__ == '__main__':
    main()
# Original solution
n=int(eval(input()))
mas=list(map(int,input().split()))
out=[]
mx=0
for i in range(n):
  if mx>n-i:
    break
  j=i
  ans=0
  while j<n-1:
    if mas[j]>=mas[j+1]:
      ans+=1
    else:
      break
    j+=1
  
  if ans>mx:
    mx=ans
  
print(mx)


# Optimized solution
n=int(eval(input()))
mas=list(map(int,input().split()))
out=[]
mx=0
i=0
while i<n:
  if mx>n-i:
    break
  j=i
  ans=0
  while j<n-1:
    if mas[j]>=mas[j+1]:
      ans+=1
    else:
      break
    j+=1
  
  if ans>mx:
    mx=ans
  i+=ans+1
  
print(mx)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
import heapq
heap = []
for i in range(n):
  m = 0
  for j in range(i,n-1):
    if h[j] >= h[j+1]:
      m += 1
    else:
      break
  heapq.heappush(heap, -m)
print((-heapq.heappop(heap)))

# Optimized solution
n = int(eval(input()))
H = list(map(int, input().split()))
A = [0]*(n*1)
for i in range(1,n):
  A[-(i+1)] = (A[-i] + 1 if H[-(i+1)] >= H[-i] else 0)
print((max(A)))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
kari = 0
honto = 0
for i in range(n-1):
    kari = 0
    for j in range(i,n-1):
        if h[j+1] <= h[j]:
            kari += 1
        else:
            break
    if honto < kari:
        honto = kari
print(honto)



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

a = 0
for i in range(n+1):
  c = 0
  for j in range(n-i-1):
    if h[i:][j] >= h[i:][j+1]:
      c += 1
    else:
      break
  if c > a:
    a = c
        
print(a)
    

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

c = 0
a = 0   
for i in range(n-1):
  if h[i] >= h[i+1]:
    c += 1
  else:
    a = max(c, a)
    c = 0
    
#最後のcはelseで引っかからない
a = max(c, a)    
        
print(a)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))

ans = 0
for i in range(n-1):
  s = h[i]
  t = 0
  for j in range(i+1,n):
    if s >= h[j]:
      t += 1
      s = h[j]
    else:
      ans = max(ans, t)
      break
    ans = max(ans, t)
print(ans)

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

ans = 0
t = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    t += 1
  else:
    ans = max(ans, t)
    t = 0
    continue
  ans = max(ans, t)
print(ans)
# Original solution
n = int(eval(input()))
h_list = list(map(int,input().split()))
count = {}
for i in range(len(h_list)-1):
    if h_list[i] >= h_list[i+1]:
        count[i] = 0
        j = i
        while j < n-1:
            if h_list[j] >= h_list[j+1]:
                count[i] += 1
                j += 1

            else:
                break
if count:
    ls = sorted(list(count.items()), key=lambda x: x[1])
    print((ls[-1][1]))
else:
    print((0))

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

count = 0
bestcount = count
for i in range(n-1):
    if h_list[i] >= h_list[i+1]:
        count += 1
    else:
        bestcount = max(count,bestcount)
        count= 0
print((max(count,bestcount)))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
t = 0
result = 0
for i in range(n - 1):
  if h[i + 1] <= h[i]:
    t += 1
  else:
    result = max(t, result)
    t = 0
result = max(t, result)
print(result)

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

res = 0
ans = 0

for i in range(N-1):
  
  if h[i] >= h[i+1]:
    res += 1
    ans = max(ans, res)
  else:
    res = 0

print(ans)