Kefa decided to make some money doing business on the Internet for exactly n days. He knows that on the i-th day (1 ≤ i ≤ n) he makes a_{i} money. Kefa loves progress, that's why he wants to know the length of the maximum non-decreasing subsegment in sequence a_{i}. Let us remind you that the subsegment of the sequence is its continuous fragment. A subsegment of numbers is called non-decreasing if all numbers in it follow in the non-decreasing order.

Help Kefa cope with this task!


-----Input-----

The first line contains integer n (1 ≤ n ≤ 10^5).

The second line contains n integers a_1,  a_2,  ...,  a_{n} (1 ≤ a_{i} ≤ 10^9).


-----Output-----

Print a single integer — the length of the maximum non-decreasing subsegment of sequence a.


-----Examples-----
Input
6
2 2 1 3 4 1

Output
3
Input
3
2 2 9

Output
3


-----Note-----

In the first test the maximum non-decreasing subsegment is the numbers from the third to the fifth one.

In the second test the maximum non-decreasing subsegment is the numbers from the first to the third one.

Difficulty: interview

Starter code:

Solutions:
n = input()
v = list(map(int, input().split()))

best = 1
current = 1
for i in range(1, len(v)):
    if v[i-1] <= v[i]:
        current += 1
    else:
        current = 1
    best = max(best, current)

print(best)


n = int(input())
a = list(map(int, input().split()))

result = 1
cur = 1
prev = a[0]
for x in a[1:]:
    if x >= prev:
        cur += 1
    else:
        cur = 1
    result = max(result, cur)
    prev = x
print(result)


n = int(input())
a = list(map(int, input().split()))
d = 1
m = 0
for i in range(1,n):
    if a[i] >= a[i-1]:
        d += 1
    else:
        m = max(m,d)
        d = 1
m = max(m,d)
print(m)


n=int(input())
t=[int(i) for i in input().split()]
v=1
j=1
for i in range(1,n):
	if t[i]>=t[i-1]:
		j+=1
	else:
		v=max(v,j)
		j=1
v=max(v,j)
print(v)

n = int(input())
a = list(map(int, input().split()))
k = 1
m = 0
for i in range(1, n):
    if a[i] >= a[i - 1]:
        k += 1
    else:
        m = max(m, k)
        k = 1
print(max(m, k))


a = int(input())
a = list(map(int, input().split()))
t = 1
maxt = 0
for i in range(1, len(a)):
    if a[i] >= a[i-1]:
        t += 1
    else:
        maxt = max(t, maxt)
        t = 1
maxt = max(maxt, t)
print(maxt)

import math
import sys
withFile = 0

if(withFile == 1):
    fin     = open('input.txt', 'r')
    fout    = open('output.txt', 'w')

def getl():
    if(withFile == 0):
        return input()
    else:
        return fin.readline()
def printl(s):
    if(withFile == 0):
        print(s)
    else:
        fout.write(str(s))
def get_arr():
    x = getl().split(' ')
    if(x[-1] == ''):
        x = x[:-1]
    return list(map(int, x))

n = get_arr()[0]
a = get_arr()
f = [1 for i in range(n)]
for i in range(n):
    if(i == 0):
        continue;
    if(a[i] >= a[i-1]):
        f[i] += f[i-1];

print(max(f))

if(withFile == 1):
    fin.close()
    fout.close()

n = int(input())
arr = [int(x) for x in input().split()]

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

n = int(input())
ans = 0
cnt = 0
last = 0
for i in map(int, input().split()):
    if i >= last:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 1
    last = i
ans = max(ans, cnt)
print(ans)


n=int(input())
a=list(map(int,input().split()))
dp=[0]*(n)
dp[0]=1
for i in range(1,n):
    if(a[i]>=a[i-1]):
        dp[i]=dp[i-1]+1
    else:
        dp[i]=1
print(max(dp))

n = int(input())
arr =[int(x) for x in input().split()]
prev = arr[0]
ans = 1
c = 1
for i in range(1, n):
    if arr[i] >= arr[i-1]:
        c += 1
    else:
        c = 1
    ans = max(ans, c)
print(ans)

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

n = int(input())
A = list(map(int,input().split()))

count = 0
ans = 0
prev = -1
for a in A:
    if prev <= a:
        count += 1
        ans = max(ans, count)
    else:
        count = 1
    prev = a

print(ans)


n = int(input())
arr =[int(x) for x in input().split()]
prev = arr[0]
ans = 1
c = 1
for i in range(1, n):
    if arr[i] >= arr[i-1]:
        c += 1
    else:
        c = 1
    ans = max(ans, c)
print(ans)

__author__ = 'kolya'
n = int(input())
m = [int(i) for i in input().split()]

counter = 1
max = 1
f = m[0]
for i in range(1, n):
    if m[i] >= f:
        counter += 1
    else:
        if counter > max:
            max = counter
        counter = 1
    f = m[i]
if(counter > max):
    max = counter
print(max)

n=int(input())
a=[]
a=[int(x) for x in input().split()]
c=1
max1=0
for i in range(1,len(a)):
    if a[i]>=a[i-1]:
        c=c+1
    else:
        if c>max1:
            max1=c
        c=1
if c>max1:
    max1=c
print(max1)        


__author__ = 'pxy'
i=int(input())
g=[int(j) for j in input().split()]
k=1
maxx=0
for j in range(i-1):
    if g[j]<=g[j+1]:
        k+=1
    else:
        if(k>maxx):
            maxx=k
        k=1
print(max(k,maxx))

n = int(input())
L = list(map(int, input().split()))
a = 1
m = 0
v = L[0]
for i in range(1,n):
    if L[i]>=v:
        a+=1
    else:
        if a > m:
            m = a
        a = 1
    v = L[i]
print(max([a,m]))

n = int(input())
a = list(map(int, input().split()))
max_len = 0
cur_len = 0
cur = -1
for i in range(n):
    if a[i] >= cur:
        cur_len += 1
        cur = a[i]
        max_len = max(max_len, cur_len)
    else:
        cur = a[i]
        cur_len = 1
print(max_len)


#!/usr/bin/env python
# 580A_steps.py - Codeforces.com/problemset/problem/580/A by Sergey 2015

import unittest
import sys

###############################################################################
# Steps Class (Main Program)
###############################################################################


class Steps:
    """ Steps representation """

    def __init__(self, test_inputs=None):
        """ Default constructor """

        it = iter(test_inputs.split("\n")) if test_inputs else None

        def uinput():
            return next(it) if it else sys.stdin.readline().rstrip()

        # Reading single elements
        [self.n] = list(map(int, uinput().split()))

        # Reading a single line of multiple elements
        self.nums = list(map(int, uinput().split()))

    def calculate(self):
        """ Main calcualtion function of the class """

        maxsf = 0
        maxc = 0

        for i in range(len(self.nums)):
            if i != 0:
                if self.nums[i] >= self.nums[i-1]:
                    maxc += 1
                    maxsf = max(maxsf, maxc)
                else:
                    maxc = 0

        return str(maxsf+1)

###############################################################################
# Unit Tests
###############################################################################


class unitTests(unittest.TestCase):

    def test_single_test(self):
        """ Steps class testing """

        # Constructor test
        test = "6\n2 2 1 3 4 1"
        d = Steps(test)
        self.assertEqual(d.n, 6)
        self.assertEqual(d.nums[0:3], [2, 2, 1])

        # Sample test
        self.assertEqual(Steps(test).calculate(), "3")

        # Sample test
        test = "3\n2 2 9"
        self.assertEqual(Steps(test).calculate(), "3")

        # Sample test
        test = "2\n0"
        self.assertEqual(Steps(test).calculate(), "1")
        test = "2\n0 0"
        self.assertEqual(Steps(test).calculate(), "2")
        test = "3\n0 -1 1 1"
        self.assertEqual(Steps(test).calculate(), "3")

        # My tests
        test = ""
        # self.assertEqual(Steps(test).calculate(), "0")

        # Time limit test
        # self.time_limit_test(5000)

    def time_limit_test(self, nmax):
        """ Timelimit testing """
        import random
        import timeit

        # Random inputs
        test = str(nmax) + " " + str(nmax) + "\n"
        numnums = [str(i) + " " + str(i+1) for i in range(nmax)]
        test += "\n".join(numnums) + "\n"
        nums = [random.randint(1, 10000) for i in range(nmax)]
        test += " ".join(map(str, nums)) + "\n"

        # Run the test
        start = timeit.default_timer()
        d = Steps(test)
        calc = timeit.default_timer()
        d.calculate()
        stop = timeit.default_timer()
        print(("\nTimelimit Test: " +
              "{0:.3f}s (init {1:.3f}s calc {2:.3f}s)".
              format(stop-start, calc-start, stop-calc)))

def __starting_point():

    # Avoiding recursion limitaions
    sys.setrecursionlimit(100000)

    if sys.argv[-1] == "-ut":
        unittest.main(argv=[" "])

    # Print the result string
    sys.stdout.write(Steps().calculate())

__starting_point()

n = int(input())
al = list(map(int, input().split()))
res, t = 0, 0
last = -1
for i in al:
    if i >= last:
        t += 1
    else:
        res = max(t, res)
        t = 1
    last = i
print(max(t, res))


n = int(input())
nums = list(map(int, input().split()))

dp = [0]*n
dp[0] = 1
for i in range(1, n):
    if nums[i]>=nums[i-1]:
        dp[i] = dp[i-1]+1
    else:
        dp[i] = 1
print(max(dp))


#In the name of Allah

from sys import stdin, stdout
input = stdin.readline

n = int(input())
a = [float("inf")] + list(map(int, input().split()))

ans = 1
t = 1

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

stdout.write(str(max(ans, t)))


3
# -*- coding: <utf-8> -*-

import itertools as ittls
from collections import Counter

def sqr(x):
    return x*x

def inputarray(func = int):
    return list(map(func, input().split()))

# -------------------------------
# -------------------------------

N = int(input())
A = list(inputarray())

maxv = 1
currmaxv = 1
for i in range(1, len(A)):
    if A[i] >= A[i - 1]:
        currmaxv = currmaxv + 1
    else:
        currmaxv = 1
    maxv = max(maxv, currmaxv)

print(maxv)



n = input()
ax = list(map(int, input().split()))

c = 0
last = -1
cmax = 0

for a in ax:
    if a >= last:
        c += 1
    else:
        cmax = max(c, cmax)
        c = 1
    last = a

cmax = max(c, cmax)
print(cmax)


n=int(input())
arr=list(map(int, input().split()))
ans=1
temp=1
for i in range(1,n):
    if arr[i]>=arr[i-1]:
        temp+=1
    else:
        if temp>ans:
            ans=temp
        temp=1
print(max(ans, temp))