Cappuccino Assassino


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type
Allowed languages
C++, Java, Python

Cappuccino Assassino is playing with his new friend, Ballerina Cappuccina, and they have found some dominos to play with. The dominos have various sizes, and they have been lined up in some order standing up. Assassino is interested in how they will behave if he knocks over one of them. He says that any knocked over domino will surely trigger the rest of them to fall over. Ballerina chides him; obviously a domino can only knock over a strictly smaller domino and over time, they will lose energy due to factors such as friction.

You are given the sizes and order of the dominos. We can pick a single domino to knock over. When knocked over, each domino will knock over the next domino in front of it if its size is strictly greater than the previous one. Assassino and Ballerina start by knocking over the domino which will cause maximum number of dominos to fall by the end of the chain reaction. What is the length of the streak of dominos?

Input

The first line contains a single integer n (1 \leq n \leq 10^5), the number of dominos which have been lined up. The dominos are labelled 1 through n.

The next line contains n space-separated integers a_i (1 \leq a_i \leq 10^9), the size of each of the n dominos.

Output

Output the longest streak of dominos.

Example

Input 1
13
5 4 3 2 2 1 9 8 7 6 4 4 1
Output 1
5

5 is the longest streak (9 - 8 - 7 - 6 - 4)

Input 2
3
99 100 101
Output 2
1

Comments

There are no comments at the moment.