Today, we're working with binary numbers.
Given a base-10 integer, n, convert it to binary (base-2). Then find and print the base-10 integer denoting the maximum number of consecutive 1's in n's binary representation.
A single integer, n.
1<=n<=106
Print a single base-10 integer denoting the maximum number of consecutive 1's in the binary representation of n.
5
1
13
2
Sample Case 1: The binary representation of 5 is 101, so the maximum number of consecutive 1's is 1.
Sample Case 2: The binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.