#include <bits/stdc++.h>
using namespace std;
unsigned best[10000002];
int main() {
  unsigned long long a, n;
  cin >> a >> n;
  unsigned long long res = 0;
  for (unsigned long long i = 1; i < a + n; i++) {
    best[i] = max(best[i], 1u);
    if (i * i < a + n) best[i * i] = i * i;
    if (best[i] == i)
      for (unsigned long long j = i; j < a + n; j += best[i])
        best[j] = max(best[j], best[i]);
    if (i >= a) res += i / best[i];
  }
  cout << res << endl;
}
