题目描述
You are given a string S. Find the length of its the longest substring which occurs at least two times. Occurences can intersect.
Input
One line containing a string S consisting of lowercase Latin letters.
Output
Output one integer - answer to the question.
Constraints
1 ≤ length of S ≤ 1000000
SAMPLE INPUT
abacaba
SAMPLE OUTPUT
3
输入格式
见题面
输出格式
见题面
样例输入
olbxxtboqvnvvspyrhtkgujogecawqowuosmdxfsibmucfxmhfyzmclrryevxpdwdvxikjnzwecdniowfjzyisofzfxwqxbeuwxavkidgfyokcoihndrlnlpocvxncsktpfbnnywgmwmwxfevfgiblbnvvspyrhtkgujogecawqowuosmdxfsibmucfxmhfyzmclrryevxpdwdvxikjnzwecdniowfjzyisofzfxwqxbeuwxavkidgfyokcoihndrlnlpoyooyblcyilhjoxuvjituzqexuwmazdgxeeecfr
样例输出
111