#ARC159D. [ARC159D] LIS 2
[ARC159D] LIS 2
Score : points
Problem Statement
We have a sequence , which is initially empty. Takahashi has performed the following operation for in this order.
- Append in this order to the end of .
Find the greatest length of a strictly increasing subsequence of the final .
Constraints
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
The final is . The -st, -nd, -rd, -th, -th, -th, -th, and -th elements form a strictly increasing subsequence with the greatest length.
The final is .