N = int(eval(input()))

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

res = [0] * N



for index, h in enumerate(Hs):

    l = 0

    if index > 0:

        l = max(res[index - 1] - 3, 0)



    tmp = h

    while index + l + 1 < N and tmp >= Hs[index + l + 1]:

        tmp = Hs[index + l + 1]

        l += 1

    res[index] = l



print((max(res)))
N = int(eval(input()))

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

res = [0] * N



for index, h in enumerate(Hs):

    l = 0

    if index > 0:

        l = max(res[index - 1] - 2, 0)



    tmp = h

    while index + l + 1 < N and tmp >= Hs[index + l + 1]:

        tmp = Hs[index + l + 1]

        l += 1

    res[index] = l



print((max(res)))
N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
    l = 0
    if index > 0:
        l = max(res[index - 1] - 3, 0)
    tmp = h
    while index + l + 1 < N and tmp >= Hs[index + l + 1]:
        tmp = Hs[index + l + 1]
        l += 1
    res[index] = l
print((max(res)))

N = int(eval(input()))
Hs = list(map(int, input().split()))
res = [0] * N
for index, h in enumerate(Hs):
    l = 0
    if index > 0:
        l = max(res[index - 1] - 2, 0)
    tmp = h
    while index + l + 1 < N and tmp >= Hs[index + l + 1]:
        tmp = Hs[index + l + 1]
        l += 1
    res[index] = l
print((max(res)))

-        l = max(res[index - 1] - 3, 0) +        l = max(res[index - 1] - 2, 0)