Find the length of the longest strictly increasing subsequence (elements need not be contiguous).
Input: one line of space-separated integers. Output: the length.
Your program reads from stdin and prints to stdout.
Example 1
Input: 10 9 2 5 3 7 101 18
Output: 4
Hints