CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))
H.append(10**10)
tmp = 0
for i in range(0,N-2):
    new_tmp = 0
    j = i
    while H[j] >= H[j+1]:
        new_tmp += 1
        j += 1
    if new_tmp > tmp:tmp = new_tmp
print(tmp)

# Optimized solution
N = int(eval(input()))
H = list(map(int,input().split()))
tmp = 0
new_tmp = 0
i = N-1
while i >= 1:
    if H[i] <= H[i-1]:
        new_tmp += 1
        i -= 1
        if new_tmp > tmp:
            tmp = new_tmp
    else:
        if new_tmp > tmp:
            tmp = new_tmp
        new_tmp = 0
        i -= 1
print(tmp)
# Original solution
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(eval(input()))
h = readints()

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


# Optimized solution
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


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

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

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

ans=0
sum=0
for i in range(N-1):
    if H[i]>=H[i+1]:
        sum += 1
    else:
        sum = 0
    ans = max(ans,sum)
print(ans)
# Original solution
N=int(eval(input()))
H=list(map(int,input().split()))
max_ans=0
for i in range(len(H)):
    A=i
    ans=0
    for j in range(i+1,len(H)):
        if H[A]>=H[j]:
            ans=ans+1
        elif H[A]<H[j]:
            break
        A=A+1
    max_ans=max(ans,max_ans)
print(max_ans)

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

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


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

ans = 0
H_r = H[::-1]
cnt = 0

for i in range(n - 1):
    now = H_r[i]
    nex = H_r[i + 1]
    if now <= nex:
        cnt += 1
        ans = max(ans, cnt)
    else:
        cnt = 0
    nex = now
print(ans)
# Original solution
# 2019-11-17 20:44:23(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    n, *h = [int(x) for x in sys.stdin.read().split()]
    
    step = 0
    prev_height = 0
    max_step = 0
    for i in range(n):
        if h[i] <= prev_height:
            step += 1
        else:
            max_step = max(max_step, step)
            step = 0
        prev_height = h[i]
    max_step = max(max_step, step)
    print(max_step)

if __name__ == "__main__":
    main()


# Optimized solution
import sys

n, *H = list(map(int, sys.stdin.read().split()))

def main():
    res = 0
    cnt = 0
    prev = 0
    for h in H + [float('inf')]:
        if h <= prev:
            cnt += 1
        else:
            res = max(res, cnt)
            cnt = 0
        prev = h
    return res
    
if __name__ == '__main__':
    ans = main()
    print(ans)
# Original solution
import sys

n, *H = list(map(int, sys.stdin.read().split()))

def main():
    res = 0
    cnt = 0
    prev = 0
    for h in H + [float('inf')]:
        if h <= prev:
            cnt += 1
        else:
            res = max(res, cnt)
            cnt = 0
        prev = h
    return res
    
if __name__ == '__main__':
    ans = main()
    print(ans)

# Optimized solution
import sys

n, *h = list(map(int, sys.stdin.read().split()))
h += [float('inf')]

def main():
    prev = res = cnt = 0
    for x in h:
        if x > prev:
            res = max(res, cnt)
            cnt = 0
        else:
            cnt += 1
        prev = x
    print(res)

if __name__ ==  '__main__':
    main()
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))
maxMove = 0
tempoMove = 0
for i in range(N):
  if N-len(list(range(i))) <= maxMove:
    break
  for j in range(N-i-1):
    if i < maxMove:
      break
    if H[i+j]>=H[i+j+1]:
      tempoMove = tempoMove + 1
    else:
      break
  if tempoMove > maxMove:
    maxMove = tempoMove
    tempoMove = 0
  else:
  	tempoMove = 0
print(maxMove)

# Optimized solution
N = int(eval(input()))
H = list(map(int,input().split()))
maxMove = 0
tempoMove = 0
for i in range(N):
  if N-len(list(range(i))) <= maxMove:
    break
  if tempoMove > 0:
    tempoMove = tempoMove - 1
    continue
  for j in range(N-i-1):
    if H[i+j]>=H[i+j+1]:
      tempoMove = tempoMove + 1
    else:
      break
  if tempoMove > maxMove:
    maxMove = tempoMove
print(maxMove)
# Original solution
N = int(eval(input()))
H = [int(e) for e in input().split()]
count_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:
      i += j + 1
      break;

  if count_max < count:
    count_max = count
  if count_max > N / 2:
    break;

print(count_max)

# Optimized solution
N = int(eval(input()))
H = [int(e) for e in input().split()]
count_max = 0
i = 0
while i < N:
  judge = True
  count = 0
  tmp = i
  for j in range(tmp,N):
    if j < N-1:
      if H[j] >= H[j+1]:
        count += 1
      else:
        break;

  #print(count)
  if count_max < count:
    count_max = count
  if judge == True:
    i += count + 1

print(count_max)
# Original solution
N = int(eval(input()))
numbers = [int(n) for n in input().split(' ')]
distances = []
if N == 1:
    print((0))
else:
    counter = 0
    for i in range(0, len(numbers)):
        if i == len(numbers) - 1:
            distances.append(counter)
            break
        if numbers[i] >= numbers[i + 1]:
            counter += 1
        else:
            distances.append(counter)
            counter = 0

    print((max(distances)))

# Optimized solution
N = int(eval(input()))
numbers = [int(n) for n in input().split(' ')]
distances = []
counter = 0
for i in range(0, len(numbers)):
    if i == len(numbers) - 1:
        distances.append(counter)
        break
    if numbers[i] >= numbers[i + 1]:
        counter += 1
    else:
        distances.append(counter)
        counter = 0
print((max(distances)))
# Original solution
N = int(eval(input()))
H = list(map(int, input().split()))

counter = -1
last_h = float('inf')
_max = 0
for h in H:
    if h <= last_h:
        counter += 1
    else:
        if _max < counter:
            _max = counter
        counter = 0
    last_h = h
if _max < counter:
    _max = counter
print(_max)

# Optimized solution
def solve(N, H):
    last_h = float('inf')
    _count = -1
    _max = 0
    for h in H:
        if h <= last_h:
            _count += 1
        else:
            if _max < _count:
                _max = _count
            _count = 0
        last_h = h
    if _max < _count:
        _max = _count
    return _max


if __name__ == '__main__':
    N = int(eval(input()))
    H = list(map(int, input().split()))
    
    ans = solve(N, H)
    
    print(ans)
# Original solution
n=int(eval(input()))
h=list(map(int,input().split()))
li=[0]
for i in range(n-1):
  if not(h[i]<h[i+1]) and (i==0 or h[i-1]<h[i]):
    k=0
    while i+k<n-1 and not(h[i+k]<h[i+k+1]):
      k+=1
    li=li+[k]
  if sum(li)>n/2:
    break
print((max(li)))

# Optimized solution
n=int(eval(input()))
h=list(map(int,input().split()))
li=[0]
while len(h)>1:
  for i in range(len(h)):
    if i==len(h)-1:
      li += [len(h)-1]
      del h[1:]
    elif h[i]<h[i+1]:
      li += [len(h[0:i+1])-1]
      del h[0:i+1]
      break
print((max(li)))
# Original solution
N = int(eval(input()))
H = list(map(int,input().split()))

s = 0
for i in range(N-1):
    num = i
    t = 0
    while num < N - 1 and H[num] >= H[num + 1]:
        t += 1
        num += 1
    if s <= t:
        s = t
        
print(s)

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

s = 0
i = 0
while 0 <= i < N - 1:
    num = i
    t = 0
    while num < N - 1 and H[num] >= H[num + 1]:
        t += 1
        num += 1
    if s <= t:
        s = t
    i = num + 1
        
print(s)
# Original solution
import copy
n = int(eval(input()))
r_L = list(map(int,input().split()))
l_L = copy.deepcopy(r_L)
l_L.reverse()


r_ans,l_ans = 0,0
r_ans_L,l_ans_L = [],[]

for val in range(n-1):
    if r_L[val] >= r_L[val+1]:
        r_ans += 1
    else:
        r_ans_L.append(r_ans)
        r_ans = 0
    



l_ans_L.append(l_ans)
r_ans_L.append(r_ans)

print((max(max(l_ans_L),max(r_ans_L))))


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


s = h_L[0]
tmp = 0
result_L = []
for i in range(0,n-1):

    if s >= h_L[i+1]:
        tmp += 1
    else:
        result_L.append(tmp)
        tmp = 0

    s = h_L[i+1]

result_L.append(tmp)
print((max(result_L)))
# Original solution
N = int(eval(input()))
Hs = list(map(int, input().split())) + [10**10]

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

print(ans)


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

ans = 0
num = 0
for i in range(N-1):
    if Hs[i] >= Hs[i+1]:
        num += 1
        if num > ans:
            ans = num
    else:
        num = 0

print(ans)
# Original solution
def solve(inp):
    N = int(inp.readline().strip())
    H = list(map(int, inp.readline().strip().split(' ')))

    r = 0
    for i in range(N):
        r0 = 0
        prev = H[i]
        for j in range(i + 1, N):
            if prev < H[j]:
                break
            r0 += 1
            prev = H[j]
        r = max(r, r0)

    return str(r)


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()


# Optimized solution
def solve(inp):
    N = int(inp.readline().strip())
    H = list(map(int, inp.readline().strip().split(' ')))

    r = 0
    i = 0
    while i < N:
        r0 = 0
        prev = H[i]
        j = i + 1
        while j < N:
            if prev < H[j]:
                break
            r0 += 1
            prev = H[j]
            j += 1
        r = max(r, r0)
        i = j

    return str(r)


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


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

# Optimized solution
n = int(eval(input()))
h = list(map(int, input().split()))
y = 0
x = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
      x += 1
      if x > y:
        y = x
  else:
      x = 0
print(y)
# Original solution
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]: b += 1
  else: 
    b = 0
  a = max(a, b)
print(a)

# Optimized solution
N = int(eval(input()))
H = list(map(int, input().split()))
 
ans, b = 0, 0
for i in range(N-1):
  if H[i] >= H[i+1]: b += 1
  else:
    ans = max(ans, b)
    b = 0
    
ans = max(ans, b)
print(ans)
# Original solution
N = int(eval(input()))
h = list(map(int, input().split()))
h.append(1000000001)
max_n = 0
for i in range(N-1):
    add = 0
    count = 0
    while h[i+add] >= h[i+add+1]:
        count += 1
        add += 1
    max_n = max(max_n, count)
print(max_n)

# Optimized solution
N = int(eval(input()))
h = list(map(int, input().split()))
h.append(1000000001)
max_n = 0
counter = 0
while counter < N-1:
    add = 0
    count = 0
    while h[counter+add] >= h[counter+add+1]:
        count += 1
        add += 1
    counter += add +1
    max_n = max(max_n, count)
print(max_n)
# Original solution
# -*- coding: utf-8 -*-
# 整数の入力
n = int(eval(input()))
h = list(map(int, input().split()))

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

print(max_count)


# Optimized solution
# -*- coding: utf-8 -*-
# 整数の入力
n = int(eval(input()))
h = list(map(int, input().split()))

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

if max_count < tmp_count:
    max_count = tmp_count

print(max_count)
# Original solution
number = int(eval(input()))
lower = list(map(int, input().split()))

time = 0
max = 0

def down(i):
    global time
    for j in range(i, number-1):
        if lower[j] >= lower[j+1]:
            time += 1
        else:
            return


for i in range(len(lower)):

    if max > (number-i+1):
        break

    down(i)

    if max < time:
        max = time
    time = 0

print(max)


# Optimized solution
number = int(eval(input()))
lower = list(map(int, input().split()))

time = 0
max = 0

def down(i):
    global time
    for j in range(i, number-1):
        if lower[j] >= lower[j+1]:
            time += 1
        else:
            return j+1

    return 0

now = 0
for i in range(len(lower)):

    if now > i:
        continue

    if max > (number-i+1):
        break

    now = down(i)

    if max < time:
        max = time
    time = 0



print(max)
# Original solution
import sys, heapq
def LI(): return list(map(int, sys.stdin.readline().split()))
def LS(): return list(sys.stdin.readline())

N = int(eval(input()))
H = LI()

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

res = max(res, cnt)
print(res)

# Optimized solution
import sys, heapq
def LI(): return list(map(int, sys.stdin.readline().split()))
def LS(): return list(sys.stdin.readline())

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

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

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

higher = [0]
move = [0]

for i in range(1, n):
  if h[i-1] < h[i]:
    m = i - higher[len(higher) - 1] - 1
    move.append(m)
    higher.append(i)

move.append(len(h) - 1 - higher[len(higher) - 1])


print((max(move)))

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

move = [0]
cnt = 0

for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt += 1
    if i == n-2:
      move.append(cnt)
  else:
    move.append(cnt)
    cnt = 0


print((max(move)))
# Original solution
n = int(eval(input()))
hn = [int(i) for i in input().split()]
max_cnt, cnt = 0, 0
for i in range(1, n):
    if hn[i - 1] - hn[i] >= 0:
        cnt += 1
    else:
        cnt = 0
    if max_cnt < cnt:
        max_cnt = cnt        
print(max_cnt)

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

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

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

# 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

ans = max(ans, cnt)
print(ans)
# Original solution
n = int(eval(input()))
x = input().split()
y = [0]
c = 0
for i in range(n-1):
  if int(x[i]) >= int(x[i+1]):
    c = c + 1
  else:
    y.append(c)
    c = 0
y.append(c)
print((max(y)))

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

if n == 1:
	print((0))
else:
	atual = 0
	max_value = 0
	contador = 0
	while atual + 1 < n:
		if alturas[atual] >= alturas[atual+1]:
			contador += 1
		else:
			max_value = max(contador, max_value)
			contador = 0
		atual += 1
	max_value = max(contador, max_value)
	print(max_value)
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))
count = []
for i in range(n):
    j = i
    count.append(0)
    while j < n -1 and h[j] >= h[j+1]:
        count[i] += 1
        j += 1
print((max(count)))


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


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

if __name__ == "__main__":
    main()



# Optimized solution
def main():
    n = int(eval(input()))
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()
# Original solution
def main():
    n = int(eval(input()))
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()



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

def main():
    n = int(eval(input()))
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()
# Original solution
n = int(eval(input()))
h = list(map(int,input().split()))
cnt = 0
for i in range(n-1):
    j = i
    cnt_ = 0
    while h[j] >= h[j+1]:
        cnt_ += 1
        j += 1
        if j == n-1:
            break
    if cnt_ > cnt:
        cnt = cnt_
print(cnt)

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

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    n = int(eval(input()))
    hl = list(map(int, input().split()))
    counts = [0] * n

    for i in range(n-1,0,-1):
        if hl[i-1] >= hl[i]:
            counts[i-1] = counts[i] + 1
    # print(counts)
    print((max(counts)))


if __name__ == '__main__':
    main()


# Optimized solution
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

def main():
    n = int(eval(input()))
    hl = list(map(int, input().split()))
    counts = [0] * n

    for i in range(1,n):
        if hl[i-1] >= hl[i]:
            counts[i] = counts[i-1] + 1
    # print(counts)
    print((max(counts)))


if __name__ == '__main__':
    main()
# Original solution
n = int(eval(input()))
h = [int(i) for i in input().split()]
c = 0
m = 0
for i in range(n-1):
	if h[i] >= h[i+1]:
		if i == n - 1:
			c += 2
		else:
			c += 1
		m = max(c,m)
	else:
		c = 0
print(m)

# Optimized solution
n = int(eval(input()))
h = [int(i) for i in input().split()]
c = 0
m = 0
for i in range(n-1):
	if h[i] >= h[i+1]:
		c += 1
		m = max(c,m)
	else:
		c = 0
print(m)
# Original solution
import sys
sys.setrecursionlimit(1000000)

n = int(eval(input()))
lists = list(map(int,input().split()))
res = []
def func(i, sum):
    if i == n-1:
        return sum
    if lists[i] < lists[i+1]:
        return sum
    return func(i+1, sum+1)

for j in range(n):
    res.append(func(j, 0))
print((max(res)))



# Optimized solution
import sys
sys.setrecursionlimit(100000) 

n = int(eval(input()))
high = list(map(int,input().split()))
lists = []

def func(i,t):
    if i == n - 1:
        lists.append(t)
        return
    if high[i] < high[i+1]:
        lists.append(t)
        func(i+1,0)
    else:
        t += 1
        func(i+1,t)

func(0,0)
print((max(lists)))