#include<bits/stdc++.h> using namespace std; int main(){ int l,r,tot=0; cin>>l>>r; for(int i=l;i<=r;i++){ for(int j=0;j<=14;j++){ for(int k=j;k<=14;r++){ if(pow(2,j)+pow(2,k)==i){ tot++; } } } } cout<<tot; }