#include <bits/stdc++.h>
using namespace std;
long long i, j, N, M, n, m, k, p;
long long sq[10000001];
int main() {
  long long A, a;
  cin >> a >> N;
  long long inf = 1e7 + 1;
  long long last;
  for (i = 1, j = 3; i < inf; i += j, j += 2)
    for (p = i; p < inf; p += i) sq[p] = i;
  long long sum = 0;
  A = a;
  for ((i) = (0); (i) < (N); (i)++) sum += (i + A) / sq[i + A];
  cout << sum << endl;
  return 0;
}
