#include<bits/stdc++.h>

using namespace std;


typedef long long LL;


LL divs(LL m, LL n) {
	LL res = 0;

	for (LL i = 1; i * i <= n; ++i) {
		LL p = m / i;
		LL q = n / i;

		if (p * i < m)
			p++;

		p = max(p, i);

		res += max(0LL, (q - p + 1)) * 2;

		// cerr << "i = " << i << ", p = " << p << ", q = " << q << endl;

		LL s = i * i;

		if (m <= s && s <= n) {
			// cerr << "there is a square" << endl;
			res--;
		}
	}

	return res;
}


int main() {
    ios_base::sync_with_stdio(0);
	cin.tie(0);

	LL n, m;
	cin >> m >> n;

	cout << divs(m, n) << endl;

	return 0;
}

