游客 Signup | Login
中文 | En

1529 - Coincidence

通过次数

0

提交次数

0

Time Limit : 1 秒 Memory Limit : 32 MB

Find a longest common subsequence of two strings.

Input

First and second line of each input case contain two strings of lowercase character a…z. There are no spaces before, inside or after the strings. Lengths of strings do not exceed 100.

Output

For each case, output k – the length of a longest common subsequence in one line.

Examples

Input Format

google
goodbye

Output Format

4