#include using namespace std; using ll = long long; using Vi = vector; using Pii = pair; #define mp make_pair #define pb push_back #define x first #define y second #define rep(i,b,e) for(int i = (b); i < (e); i++) #define each(a, x) for(auto& a : (x)) #define all(x) (x).begin(),(x).end() #define sz(x) int((x).size()) ll solve(ll n) { int lim = int(min(n, ll(1e7))); ll ret = 0; rep(i, 1, lim+1) { ret += n/i; } ll lastPos = lim; while (lastPos < n) { ll last = n / lastPos; ll begin = lastPos, end = n+1; while (begin+1 < end) { ll mid = (begin+end) / 2; if (n/mid < last) { end = mid; } else { begin = mid; } } ret += last * (end-lastPos-1); ret += n/end; lastPos = end; } return ret; } int main() { cin.sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(12); ll n, m; cin >> n >> m; cout << solve(m) - solve(n-1) << endl; return 0; }