Given a string $S$ consisting only of lowercase letters, find the maximum value of the product of the frequency and the length of any substring of $S$ that appears more than once.
Input
A single line containing the string $S$.
Output
A single integer representing the answer.
Constraints
For all test cases, $|S| \leq 2 \times 10^5$.
Examples
Input 1
ababcbasdcbbadbcbad
Output 1
8