#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10000000;
int a, n;
int f[10010], p[MAXN + 10];
;
int A, B;
void init() {
  cin >> a >> n;
  A = a, B = a + n - 1;
  for (int i = 1; i <= 10000; ++i) f[i] = i * i;
}
void solve() {
  memset(p, -1, sizeof(p));
  for (int i = 1; i <= MAXN && i <= B; ++i) {
    for (int j = 1; j <= 10000 && i * f[j] <= B; ++j)
      if (p[i * f[j]] == -1) p[i * f[j]] = i;
  }
  long long ans = 0;
  for (int i = A; i <= B; ++i) ans += p[i];
  cout << ans << endl;
}
int main() {
  init();
  solve();
  return 0;
}
