Problem1279--Longest not descending subsequence

1279: Longest not descending subsequence

[Creator : ]
Time Limit : 1 sec  Memory Limit : 256 MB

Description

To find the length of the longest not descending subsequence.


Input

The first line n, represents the number of n.

The second line: the numbers of n.

Output

The length of the longest not descending subsequence.

Sample Input Copy

3
1 2 3

Sample Output Copy

3

HINT

n is less than 5000 For each num <=maxint

Source/Category

JoyOI