C - Lower Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 300

問題文

左右一列に N 個のマスが並んでいます。

左から i 番目のマスの高さは H_i です。

あなたは好きなマスに降り立ち、右隣のマスの高さが今居るマスの高さ以下である限り右隣のマスへ移動し続けます。

最大で何回移動できるでしょうか。

制約

  • 入力は全て整数である。
  • 1 \leq N \leq 10^5
  • 1 \leq H_i \leq 10^9

入力

入力は以下の形式で標準入力から与えられる。

N
H_1 H_2 ... H_N

出力

移動できる回数の最大値を出力せよ。


入力例 1

5
10 4 8 7 3

出力例 1

2

左から 3 番目のマスに降り立つと、右に 2 回移動できます。


入力例 2

7
4 4 5 6 6 5 5

出力例 2

3

左から 4 番目のマスに降り立つと、右に 3 回移動できます。


入力例 3

4
1 2 3 4

出力例 3

0

Score : 300 points

Problem Statement

There are N squares arranged in a row from left to right.

The height of the i-th square from the left is H_i.

You will land on a square of your choice, then repeat moving to the adjacent square on the right as long as the height of the next square is not greater than that of the current square.

Find the maximum number of times you can move.

Constraints

  • All values in input are integers.
  • 1 \leq N \leq 10^5
  • 1 \leq H_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N
H_1 H_2 ... H_N

Output

Print the maximum number of times you can move.


Sample Input 1

5
10 4 8 7 3

Sample Output 1

2

By landing on the third square from the left, you can move to the right twice.


Sample Input 2

7
4 4 5 6 6 5 5

Sample Output 2

3

By landing on the fourth square from the left, you can move to the right three times.


Sample Input 3

4
1 2 3 4

Sample Output 3

0