#include <iostream> #include <cstdio> using namespace std; long long Sum(long long m,long long n){ if(m>n){ return 0; }else{ return 1+Sum(2*m,n)+Sum(2*m+1,n); } } int main() { long long m,n; while(scanf("%ld%ld",&m,&n)!=EOF){ printf("%ld",Sum(m,n)); } return 0; }