#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979;
const double eps = 1e-6;
const long long _INF = 1e18;
const int INF = 1e9;
const int maxn = 1000;
const int maxm = 10000000;
long long l, r;
int main() {
  while (~scanf("%I64d %I64d", &l, &r)) {
    long long ans = 0;
    for (long long i = 1; i <= r; i *= 3)
      for (long long j = i; j <= r; j *= 2)
        if (j >= l) ++ans;
    printf("%I64d\n", ans);
  }
  return 0;
}
