CodeEff/ECCO huggingface dataset:
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))
h.append(float('inf'))
ans=0
cnt=0
for i in range(n):
  c=h[i]
  for j in range(i+1,n+1):
    if c>=h[j]:
      cnt+=1
      c=h[j]
    else:
      ans=max(ans,cnt)
      cnt=0
      break
print(ans)

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))
h.append(float('inf'))
ans=0
cnt=0
for i in range(n):
  if h[i]>=h[i+1]:
      cnt+=1
  else:
    ans=max(ans,cnt)
    cnt=0
ans=max(ans,cnt)
print(ans)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
max = 0
for i in range(n-1):
    tmp = 0
    j = i
    while h[j]>=h[j+1]:
        j += 1
        tmp += 1
        if j == n-1:
            break
    if tmp>max:
        max = tmp
print(max)



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

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
tmp = 0
s = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    tmp += 1
    s = max(s, tmp)
  else:
    tmp = 0
    
print(s)
# Original solution
import sys
input = sys.stdin.readline

# C - Lower
n = int(eval(input()))
h = list(map(int, input().split()))
ans = 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
	
	ans = max(ans, count)
#	print('スタート:' + str(i), count)

print(ans)

# Optimized solution
import sys
input = sys.stdin.readline

# C - Lower
n = int(eval(input()))
h = list(map(int, input().split()))
count = 0
ans = 0

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()))
H = list(map(int,input().split()))

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

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

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

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

print((max(cnt)))

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

cnts = 0
cnt = [0] * N
for i in range(1, N):
    if H[i-1] >= H[i]:
        cnts +=1
    else :
        cnts = 0
    cnt[i] = cnts

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

# Optimized solution
n = int(eval(input()))
h = list(map(int,input().split()))
ans = 0
maxi = 0
for i in range(1,n):
    if h[i-1] >= h[i]:
        ans += 1
    else:
        maxi = max(ans,maxi)
        ans = 0
print((max(maxi,ans)))
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
Max = 0
for start in range(n-1):
    count = 0
    for i in range(start+1, n):
        if h[i] <= h[i-1]:
            count += 1
        else:
            break
    Max = max(Max ,count)
print(Max)


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

Max = 0
start = 0
# cnt = 0
while start < n-1:
    # print(f"start = {start}")
    # cnt += 1
    count = 0
    for i in range(start+1, n):
        if h[i] <= h[i-1]:
            count += 1
        else:
            break
    Max = max(Max ,count)
    start = i
    # if cnt > 10:
    #     break
print(Max)
# Original solution
import sys
sys.setrecursionlimit(1000000000)

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

count = 0
ans = 0
def dfs(s):
    if s + 1 < len(h):
        if h[s] >= h[s+1]:
            global count 
            count = count + 1
            dfs(s+1)
    

for i in range(len(h)):
    count = 0
    if n - i <= ans:
        break
    if not len(h) - i < ans:
        dfs(i)
    if count > ans :
        ans = count
        
print(ans)
    

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

count = 0
ans = 0

for i in range(len(h)):
    if i + 1 < len(h):
        if h[i] >= h[i+1]:
            count = count + 1
        else:
            count = 0
    if count > ans :
        ans = count
        
print(ans)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
nm = len(h)
ans = 0
for _ in range(nm):
    cnt = 0
    while True:
        if len(h) == 1:
            break
        if h[0] >= h[1]:
            cnt += 1
            h.pop(0)
        else:
            h.pop(0)
            break
    ans = max(ans, cnt)
print(ans)


# Optimized solution
N = int(eval(input()))
N_List = list(map(int,input().split()))
ans = 0
cans = 0
for i in range(1,N):
    if N_List[i] <= N_List[i-1]:
        cans += 1
    if cans > ans:
        ans = cans
    if N_List[i] > N_List[i-1]:
        cans = 0
    
print(ans)
# Original solution
N = int(eval(input()))
data = list(map(int,input().split()))

max_cnt = 0
for tmp_i in range(N-1):
    i = tmp_i
    cnt = 0
    flag = True
    while flag:
        if i+1<N and data[i]>=data[i+1]:
            cnt += 1
            i += 1
        else:
            flag = False
    if max_cnt<cnt:
        max_cnt=cnt

print(max_cnt)


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

i = 0
max_cnt = 0
while i<N-1:
    # i = tmp_i
    cnt = 0
    flag = True
    while flag:
        if i+1<N and data[i]>=data[i+1]:
            cnt += 1
            i += 1
        else:
            flag = False
            i += 1
    # tmp_i+=1
    if max_cnt<cnt:
        max_cnt=cnt

print(max_cnt)
# Original solution
N = int(eval(input()))
H = [-1] + [int(h) for h in input().split()]

max_count = 0
for n in range(1, N):
    count = 0
    for m in range(n, N):
        if H[m] >= H[m+1]:
            count += 1
        else:
            break
    max_count = max(max_count, count)

print(max_count)

# Optimized solution
N = int(eval(input()))
H = [-1] + [int(h) for h in input().split()]

count = 0
max_count = 0
for n in range(1, N):
    if H[n] >= H[n+1]:
        count += 1
        max_count = max(max_count, count)
    else:
        count = 0

print(max_count)
# Original solution
n = int(eval(input()))
h_lst = list(map(int, input().split()))
cnt = 0
res = 0
left = 0
for i, h1 in enumerate(h_lst):
  left = h1
  while i <= len(h_lst)-2 and left >= h_lst[i+1]:
    cnt+=1
    left = h_lst[i+1]
    i+=1
  res = max(res, cnt)
  cnt = 0
print(res)

# Optimized solution
n = int(eval(input()))
h_lst = list(map(int, input().split()))
cnt = 0
res = 0
for i, left in enumerate(h_lst):
  if i <= len(h_lst)-2 and left >= h_lst[i+1]:
    cnt +=1
  else:
    res = max(res, cnt)
    cnt = 0
print(res)
# Original solution
def count_descending(nums):
    if not nums:
        return 0

    count = 1
    previous = nums[0]
    for i in range(1, len(nums)):
        if previous < nums[i]:
            return count
        else:
            count += 1
            previous = nums[i]

    return count


def max_move(nums):
    start = 0
    current_max = 0
    while start < len(nums):
        n = count_descending(nums[start:])
        current_max = max(current_max, n)
        start += n

    return current_max


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

    print((max_move(h) - 1))


if __name__ == "__main__":
    main()


# Optimized solution
def count_descending(nums, start):
    if start >= len(nums):
        return 0

    count = 1
    previous = nums[start]
    for i in range(start + 1, len(nums)):
        if previous < nums[i]:
            return count
        else:
            count += 1
            previous = nums[i]

    return count


def max_move(nums):
    start = 0
    current_max = 0
    while start < len(nums):
        n = count_descending(nums, start)
        current_max = max(current_max, n)
        start += n

    return current_max


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

    print((max_move(h) - 1))


if __name__ == "__main__":
    main()
# Original solution
def count_descending(nums, start):
    if start >= len(nums):
        return 0

    count = 1
    previous = nums[start]
    for i in range(start + 1, len(nums)):
        if previous < nums[i]:
            return count
        else:
            count += 1
            previous = nums[i]

    return count


def max_move(nums):
    start = 0
    current_max = 0
    while start < len(nums):
        n = count_descending(nums, start)
        current_max = max(current_max, n)
        start += n

    return current_max


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

    print((max_move(h) - 1))


if __name__ == "__main__":
    main()


# Optimized solution
import itertools


def count_chains(nums):
    it = iter(nums)
    try:
        previous = next(it)
    except StopIteration:
        return

    count = 1
    for n in it:
        if previous < n:
            yield count
            count = 0

        count += 1
        previous = n

    yield count


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

    print((max(count_chains(h)) - 1))


if __name__ == "__main__":
    main()
# Original solution
N = int(eval(input()))
H = [int(s) for s in input().split()]
l=0
for i in range(N):
  t_l=0
  for j in range(i, N-1):
    if H[j] >= H[j+1]:
      t_l = t_l + 1
    else:
      break
  if l < t_l:
    l = t_l
  i=i+t_l+1
print(l)


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

    while H[i] >= H[i+1] and i < N-1:

        cnt+=1
        i += 1
        if maximum < cnt:
            maximum = cnt
            
        if i == N-1:
            break
        
print(maximum)

# Optimized solution
N = int(eval(input()))
H = [int(j) for j in input().split()]
maximum = 0
cnt = 0
for i in range(0,N-1):
    
    if H[i] >=H[i+1]:
        cnt+=1
        if maximum < cnt:
            maximum = cnt
    else:
        cnt=0
        
print(maximum)
# Original solution
N=int(eval(input()))
str_list = input().split(' ')
H = [int(x) for x in str_list]
max_count = 0
for ii in range(len(H)-1):
    count=0
    while H[ii+count]>=H[ii+count+1]:
        count += 1
        if ii+count>=len(H)-1:
            break
    if max_count < count:
        max_count = count
print(max_count)


# Optimized solution
N=int(eval(input()))
str_list = input().split(' ')
H = [int(x) for x in str_list]
max_count = 0
count=0
for ii in range(len(H)-1):
    if H[ii] >= H[ii+1]:
        count += 1
    else:
        count = 0
    if max_count < count:
        max_count = count
    #if max_count + ii > len(H):
    #    break
print(max_count)
# Original solution
n = int(eval(input()))
h = list(map(int, input().split()))
h.reverse()
ans = 0
value = 0

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

print(ans)


# Optimized solution
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(eval(input()))
    H = list(map(int, input().split()))

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


if __name__ == '__main__':
    resolve()
# Original solution
N = int(eval(input()))
H = [int(x) for x in input().split()]

ans = 0
for i in range(N):
    current = 0
    if(N-i < ans):
        break
    
    while(True):
        if(i==N-1):
            break
        elif(H[i] >= H[i+1]):
                current += 1
                i += 1
        else:
            break

    if(current > ans):
        ans = current

print(ans)



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

ans = 0
i = 0

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

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

ans = 0
i = 0

for k in range(N):
    tmp = 0
    while i<N-1:
        if H[i]>=H[i+1]:
            tmp += 1
            i += 1
        else:
            break
    ans = max(tmp,ans)
    if i >= N-1:
        break
    i += 1
    
    
print(ans)
# Original solution
N = int(eval(input()))
H = [int(x) for x in input().split()]


diff = ''
for i in range(1, len(H)):
  d = H[i] - H[i-1]
  if d <= 0:
    diff += '1'
  else:
    diff += '0'
ans = max([len(s) for s in diff.split('0') ])
print(ans)
  



# Optimized solution
N = int(eval(input()))
H = [int(x) for x in input().split()]
dp = [0] * len(H) 
for i in range(1, len(H)):
  if H[i-1] >= H[i]: 
    dp[i] = dp[i-1] + 1
ans = max(dp)
print(ans)
# Original solution
N = int(eval(input()))
H = [int(x) for x in input().split()]
C = [0]*N
for i in range(N):
  for j in range(i,N-1):
    if H[j] >= H[j+1]:
      C[i] += 1
    else:
      break
print((max(C)))
    

# Optimized solution
N = int(eval(input()))
H = [int(x) for x in input().split()]
m = 0
count = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    count += 1
  else:
    count = 0
  if count > m:
    m = count
print(m)
# Original solution
n = int(eval(input()))
h = list([int(x) for x in input().split(" ")])

ans = 0

for i in range(0,n):
	kari = 0
	j = i
	while j<n-1 and h[j] >= h[j+1]:
		kari += 1
		j += 1
	if ans < kari:
		ans = kari
	if ans-1 >= n-i:
		break

print(ans)

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

ans = 0

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



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

result = 0

for i in range(n):
    kari = 0
    for j in range(i, n-1):
        if height[j] >= height[j+1]:
            kari += 1
        else:
            break

    if kari > result:
        result = kari

print(result)

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

top = [0] + [i+1 for i in range(n-1) if height[i] < height[i+1] ]

result = [top[i+1]-top[i]-1 for i in range(len(top)-1)] + [(n-1)-top[len(top)-1]]

print((max(result)))
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))
ans = 0
cnt = 0
start = 0
for i in range(N):
    if start > i:
        continue
    ans = max(ans,cnt)
    cnt = 0
    for j in range(N-i-1):
        if H[i+j] >= H[i+j+1]:
            cnt += 1
            if i+j+1 == N-1:
                print((max(ans,cnt)))
                exit()
        else:
          start = j+1
          break    
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:
          ans = max(ans,cnt)
          cnt = 0
      if i+2 == N:
        print((max(ans,cnt)))
        exit()
print(ans)
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))
l=[]
for i in range(n-1):
    if h[i+1]-h[i]<=0:
        l.append(1)
    else:
        l.append(0)
ans=0
mn=0
for j in range(len(l)):
    if l[j]==0:
        ans=0
    else:
        ans+=1
        mn=max(ans,mn)
print((max(mn,ans)))

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

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

print(cnt)

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

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

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

list_result = []
# どこを選ぶか
for i in range(n):
    
    result = 0
    # その条件で何回移動可能かを調べる
    for j in range(i, n - 1):
        #移動可能かを調べる
        if list_H[j] >= list_H[j+1]:
            result = result + 1
        else:
            break
    list_result.append(result)
    # print(i, result)
    
print((max(list_result)))
        

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

#右の数字よりもおっきいときに１，ちっさいときに０
list_H_01 = []
for i in range(n-1):
    if list_H[i] >= list_H[i+1]:
        list_H_01.append(1)
    else:
        list_H_01.append(0)
        
count = 0
list_result=[]
for i in list_H_01:
    
    if i == 0:
        list_result.append(count)
        count = 0
    if i == 1:
        count = count+1
        
list_result.append(count)
        
print((max(list_result)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

H.reverse()
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()))
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)
# Original solution
#139
N = int(eval(input()))
H = list(map(int, input().split()))

count = 0
count_new = 0
flag = 0

for i in range(N-1):
    if H[i] >= H[i + 1]:
#         print("i", i)
        count_new += 1
#         print(count)
        if i == N - 2 and flag == 0:
            flag = 1
            count = count_new 
#             print(count, "k")
        elif i == N - 2 and count_new > count:
            count = count_new
#             print(count)
    else:
        flag = 1
        if count_new > count:
            count = count_new
        count_new = 0

print(count)

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

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

print((max(c_max, count)))
# Original solution
#!/usr/bin/env python3
import sys


def solve(N: int, H: "List[int]"):

    result = 0
    while len(H) >= 2:
        count = 0
        for i in range(len(H) - 1):
            if H[i] >= H[i + 1]:
                count += 1
            else:
                break
        result = max(result, count)

        H = H[count + 1 :]

    print(result)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, H)


if __name__ == "__main__":
    main()


# Optimized solution
#!/usr/bin/env python3
import sys


def solve(N: int, H: "List[int]"):

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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, H)


if __name__ == "__main__":
    main()
# Original solution
n=int(eval(input()))
h = list(map(int,input().split()))

saidai = 0

for i in range (n):
    count = 0
    for j in range (n-i-1):
        if int(h[i+j])>=int(h[i+j+1]):
            count = count+1
        else :
            i = i + j
            break
    saidai = max(saidai,count)

print(saidai)


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

for i in range (n-1):
    if h[i]>=h[i+1]:
        count += 1
    else:
        m = max(m,count)
        count = 0
m = max(m,count)
print(m)
# Original solution
from collections import deque
N = int(eval(input()))
H = deque(list(map(int, input().split())))
ans = 0
n = 0
tmp = H.popleft()
while H:
  nxt = H.popleft()
  if tmp >= nxt:
    n += 1
    ans = max(ans, n)
  else:
    n = 0
  tmp = nxt
print(ans)

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

pre = H[0]
for h in H[1:]:
    if h <= pre:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
    pre = h
if cnt != 1:
    ans = max(ans, cnt)

print(ans)
# Original solution
n = int(eval(input()))
H = [int(x) for x in input().split()]
res = 0
right = 0
for left in range(n):
  while right+1 < n and H[right] >= H[right+1]:
    right += 1
  res = max(res, right - left)
  if right == left:
    right += 1
print(res) 

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


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

count_list = []
count = 0

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

print((max(count_list)))

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

countlist = []
count = 0

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

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

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

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