Given two string S and T. Find the longest common subsequence (LCS) of S and T.
### Input
- The first line contains string S.
- The second line contains string T.
### Output
- The length of the LCS.
### Constraints
- 1≤|S|≤106.
- 1≤|T|≤5000.
- Strings contain only lowercase letters.
### Example
Input:
aabaaacba
Output:
3