#include <bits/stdc++.h>
using namespace std;
int main() {
  long long l, r;
  int cnt = 0;
  cin >> l >> r;
  for (long long a = 1; a <= r; a *= 2) {
    for (long long b = 1; b <= r; b *= 3) {
      if (l <= a * b && a * b <= r) cnt++;
    }
  }
  cout << cnt << endl;
}
