Find the length of the longest strictly increasing subsequence for the given sequence.
The first line indicates the length of the sequence n~(1 \le n \le 1000). The second line contains the sequence itself. The numbers in the sequence are integers that do not exceed 10^4 in absolute value.
Output the length of the longest strictly increasing subsequence.
Example 1