CF215E Periodical Numbers
Description
A non-empty string $ s $ is called binary, if it consists only of characters "0" and "1". Let's number the characters of binary string $ s $ from 1 to the string's length and let's denote the $ i $ -th character in string $ s $ as $ s_{i} $ .
Binary string $ s $ with length $ n $ is periodical, if there is an integer $ 1
Input Format
The single input line contains two integers $ l $ and $ r $ ( $ 1
Output Format
Print a single integer, showing how many periodic numbers are in the interval from $ l $ to $ r $ (both ends are included).
Explanation/Hint
In the first sample periodic numbers are $ 3 $ , $ 7 $ and $ 10 $ .
In the second sample periodic numbers are $ 31 $ and $ 36 $ .