For a non-negative integer X, the Yeongseon sequence of X is the infinite sequence defined as follows.
- The first number is X.
- The number that follows an even number Y is Y/2. (0 is even.)
- The number that follows an odd number Z is Z−1.
For example, the Yeongseon sequence of 60 is 60,30,15,14,7,6,….
Given K, A, and B, write a program that counts the integers X with A≤X≤B whose Yeongseon sequence contains K.