A string is sent down to you from Heaven. Intuition says that it contains palindromes as substrings. Subconscious whispers that you must find the longest intersection of that palindromes. Conscience is sure that you dont need such intersections when one palindrome is entirely contained inside another.
Justice reminds you that palindrome is a string, that is read equally from left to right and from right to left. But Pride states that it is enough to find the longest intersection.
Input contains a string of latin letters of maximal length 1000000.
Output the length of the longest intersection of substrings-palindromes. If there are no such intersections, output 0.