- 简单递归
#include<iostream>
using namespace std;
int getnum(int m,int n){
if(m>n)return 0;
else return getnum(2*m,n)+getnum(2*m+1,n)+1;
}
int main(){
int m,n;
while(scanf("%d %d",&m,&n)!=EOF){
printf("%d\n",getnum(m,n));
}
return 0;
}