Problem E: [Middle] Looking for a team

Problem E: [Middle] Looking for a team

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 1579  Solved: 207
[Submit][Status][Web Board]

Description

LowbieH thinks his ACM teammates are stupid! So he wanted to find someone to team up again. We define the fitness between two people as the length of the longest common part of their nicknames. Now that he has found a new candidate, please tell lowbieH what the fitness of the two of them is.

Input

The input contains two string s1, s2 (1<=|s1|,|s2|<=100000), which are two lovely boys' names.

Output

A number stands the sticking level.

Sample Input

B.Tang
B.Tarjan

Sample Output

4

HINT

[Submit][Status]