#include <bits/stdc++.h>
int a, b, n;
long long ans;
int chk[10000010];
int np, pri[10000010];
int lis[10000010], mon[10000010];
void go(int now, int poi) {
  lis[now] = 1;
  for (int i = poi; i < np; ++i) {
    long long t = (long long)now * pri[i];
    if (t > n) break;
    go(t, i + 1);
  }
}
void solve() {
  for (int i = 2; i * i <= n; ++i)
    if (chk[i] == 0)
      for (int j = i * i; j <= n; j += i) chk[j] = 1;
  for (int i = 2; i <= n; ++i)
    if (chk[i] == 0) {
      pri[np] = i;
      ++np;
    }
  go(1, 0);
  for (int i = n, j = -1; i >= 1; --i) {
    if (lis[i] == 1) {
      lis[i] = j;
      j = i;
    }
  }
  for (int i = 1; i != -1; i = lis[i]) {
    for (int j = 1;; ++j) {
      int t = j * j * i;
      if (j * j * i > n) break;
      mon[t] = i;
    }
  }
}
int main(void) {
  scanf("%d%d", &a, &n);
  b = a + n - 1;
  n = b;
  solve();
  for (int i = a; i <= b; ++i) ans += mon[i];
  printf("%I64d\n", ans);
  return 0;
}
