#include <iostream>
#include <cassert>

using namespace std;

const int MAXN = 1000000000;
const int MINN = 1;

long long solve(long long n){
   long long res = 0;
   for (long long i = 1; i*(i+2) <= n; ++i) res += n/i-i-1;
   return res;
}

int main(){
//   freopen("equal2.in","rt",stdin);
//   freopen("equal2.out","wt",stdout);
   
   int a, b;
   cin >> a >> b;
   
   assert( MINN <= a && a <= b && b <= MAXN );
   
   cout << solve(b) - solve(a-1);
   
   return 0;   
}
