Problem D: 幂和数

Memory Limit:128 MB Time Limit:1.000 S
Submit:50 Solved:34

Description

对于正整数 n,如果n可以表为两个2的次幂之和,即n=2x+2y(x,y均为非负整数),那么称 n为幂和数。
给定正整数 l,r,请你求出满足l<=n<=r的整数n 中有多少个幂和数。

Input

一行,两个正整数l,r,含义如上。

Output

输出一行,一个整数,表示l,r之间幂和数的数量。

Sample Input Copy

2 8

Sample Output Copy

6

HINT

对于所有的测试数据,保证1≤l≤r≤104

Source/Category