Matches

No attempts yetTime limit1sMemory limit128 MB

Problem

There are nn matches placed in a row, each standing right next to the previous one, all with their heads (the tip that catches fire) pointing up. The ii-th match has height hih_i.

If you set fire to one match, it burns from the head downward and its height shrinks. The current height of a burning match falls from its original height all the way down to 00.

At the instant a burning match's current height becomes equal to the head height of an adjacent match (the one immediately to its left or right), the fire spreads to that neighbor, which then starts burning as well. A newly ignited match can pass the fire on to its own neighbors in the same way.

You may light exactly one match at the start. Choose it so that as many matches as possible burn, and report the maximum number of matches that can burn.

Input

The first line contains the number of matches nn (1n1061 \le n \le 10^6). The second line contains nn integers h1,h2,,hnh_1, h_2, \dots, h_n (1hi1091 \le h_i \le 10^9) separated by spaces, where hih_i is the height of the ii-th match.

Output

Print a single integer on one line: the maximum number of matches that can burn.