Let be a string consisting of uppercase English letters. A nonempty string is called a remarkable string of rank with respect to if the string k \cdot T = T + T + \ldots + T (that is, repeated times) is a substring of . More formally, S = U + k \cdot T + V where and are some (possibly empty) strings.
Given a string , find the maximum possible rank such that there exists a string which is a remarkable string of rank with respect to .
The only line of input contains the string (1 \leq |S| \leq 10^6). It is guaranteed that consists only of uppercase English letters.
Print one number: the maximum rank of a remarkable string with respect to .
Example 1