Longest Common Subsequence
Find the length of the longest sequence of characters that appears in both strings in the same order (not necessarily contiguous).
Input
Two lines, each with a lowercase string.
Output
The LCS length.
Constraints
Each string has 1 to 2000 letters.
Sample 1
Input
abcde ace
Output
3
Sample 2
Input
abc def
Output
0