A sequence is termed "individualistic" if it does not contain any pair of consecutive elements that are identical. For a given non-negative integer , your task is to find the longest individualistic subsequence from the sequence of digits in the binary representation of . Additionally, if is not zero, assume it is prefixed by an infinite number of zeros. A subsequence is defined as any sequence of elements that appear consecutively in the original sequence. Note that, by definition, any sequence of length is considered individualistic.
0 < N \leq 10^{19}.
A single line containing the number .
A single line with the length of the longest individualistic subsequence.
Example 1
Example 2
Example 3
We can consider the number as starting with a single zero, as adding any number of zeros at the beginning does not change the result. For example, for the number 25, its binary representation is 011001_2, resulting in an answer of 2. For the number 2, its binary representation is 010_2, resulting in an answer of 3. For the number 26, its binary representation is 011010_2, resulting in an answer of 4.