Description
The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) in order to make arbitrary decisions such as who gets to be milked first. They can't even flip a coin because it's so hard to toss using hooves.
They have thus resorted to"round number" matching. The first cow picks an integerless than two billion. The second cow doesthe same. If the numbers are both "round numbers", thefirst cow wins,
otherwise thesecond cow wins.
A positive integer N is said to be a "round number"ifthe binary representation of N has as many or more zeroes than it has ones. For example, theinteger9, when written in binary form, is1001.1001 has two zeroes and two ones; thus, 9is a roundnumber. The integer26is11010in binary; sinceit has two zeroes and three ones, itisnot a roundnumber.
Obviously, it takes cows a whileto convert numbers to binary, so the winner takes a whileto determine. Bessie wants to cheat and thinks she can do thatif she knows how many "round numbers" are in a given range.
Help her by writing a program that tells how many round numbers appear inthe inclusive range givenbythe input (1 ≤ Start < Finish ≤ 2,000,000,000).
Input
Line 1: Two space-separated integers, respectively Start and Finish.
Output
Line 1: A single integerthatisthecountofround numbers inthe inclusive range Start..Finish
Sample Input
212
Sample Output
6