#include <bits/stdc++.h>
using namespace std;
const int maxn = 10000001;
int a, n, x[maxn];
int main() {
  scanf("%d%d", &a, &n);
  for (int i = a; i <= a + n - 1; i++) x[i] = i;
  for (int i = 2; i * i <= a + n - 1; i++) {
    int p = i * i;
    int t = ((a + p - 1) / p) * p;
    for (int j = t; j <= a + n - 1; j += p)
      while (x[j] % p == 0) x[j] /= p;
  }
  long long ans = 0;
  for (int i = a; i <= a + n - 1; i++) ans += x[i];
  printf("%I64d\n", ans);
  return 0;
}
