eolymp
bolt
Try our new interface for solving problems
Problems

Elections

Elections

Presidential elections will start soon, and therefore Lemur Augustus and Charlie penguins, as candidates for the post, appear at their every opportunity to the people with their election speeches. But it turned out that their speeches became almost the same and therefore people no longer care whom they vote for. The third candidate, Cactus Robert, decided to take advantage of this: having noticed that some parts of both candidates completely coincided, he decided to take for himself the longest identical fragment from the speeches of Augustus and Charlie.

Input

First line contains Augustus' speech, second line contains Charlie's speech. The length of both speeches does not exceed 105. All characters in the lines are capitalised Latin letters.

Output

Print the length of Robert's speech.

Time limit 1 second
Memory limit 128 MiB
Input example #1
VOTEFORTHEGREATOSFORYOU
CHOOSETHEGREATOSNFUTURE
Output example #1
10