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.

### Input

The only input line contains the integer *n* in binary notation
(1 ≤ *n* ≤ 2^{1 000 000}).

### Output

Output one line containing the required length.

### Samples

### Notes

In the first sample, the string 11__01110__0101
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)