#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int start, finish, count = 0;
  cin >> start;
  cin >> finish;
  for (long long int i = 1; i <= finish; i *= 2) {
    for (long long int j = 1; j <= finish; j *= 3) {
      if (i * j >= start && i * j <= finish) {
        count += 1;
      }
    }
  }
  cout << count << endl;
}
