#include <bits/stdc++.h>
int const mod = 1e9 + 7;
using namespace std;
int prime[10004];
bool is[10004];
int tot;
void GetPrime() {
  for (int i = 2; i < 10004; i++) {
    if (!is[i]) {
      prime[tot++] = i;
      for (int j = 2; j * i < 10004; j++) is[i * j] = true;
    }
  }
}
int num[10000007];
int main() {
  int a, n;
  GetPrime();
  scanf("%d%d", &a, &n);
  for (int i = a; i <= a + n - 1; i++) {
    num[i] = i;
  }
  for (int i = 0; i < tot && prime[i] * prime[i] <= a + n - 1; i++) {
    int s = a / prime[i];
    for (int j = s; j * prime[i] <= a + n - 1; j++) {
      int tmp = j * prime[i];
      if (tmp < a) continue;
      int cot = 0;
      while (num[tmp] % prime[i] == 0) {
        cot++;
        num[tmp] /= prime[i];
      }
      if (cot & 1) num[tmp] *= prime[i];
    }
  }
  long long ans = 0;
  for (int i = a; i <= a + n - 1; i++) ans += num[i] * 1ll;
  printf("%I64d\n", ans);
  return 0;
}
