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