AdvancedRating 1500
Longest Common Subsequence
Print the length of the longest common subsequence of two strings (each ≤ 1000 characters).
Input
Two lines.
Output
A length.
Sample 1
Input
abcde ace
Output
3
Sample 2
Input
abc def
Output
0
Output appears here