Let an integer n be given. Write the integers from 1 to n in
binary notation successively from left to right. In the resulting string
consisting of zeros and ones, choose a palindrome substring of maximal length.
It is required to find the length of this substring.
The only input line contains the integer n in binary notation
(1 ≤ n ≤ 21 000 000).
Output one line containing the required length.
In the first sample, the string 11011100101
will be written (a variant of the longest palindrome is underlined).
Problem Author: Ilya Zvigintsev
Problem Source: XI USU Open Personal Contest (March 13, 2010)