#include <bits/stdc++.h>
long long ans, a, n;
bool vis[10000001];
int limit;
int main() {
  int i, j, k, s;
  scanf("%I64d%I64d", &a, &n);
  limit = (int)sqrt(a + n - 1);
  ans = 0;
  for (i = limit; i >= 1; i--) {
    k = i * i;
    s = a + (k - a % k) % k;
    for (j = s; j <= a + n - 1; j += k) {
      if (!vis[j]) {
        vis[j] = 1;
        ans += j / k;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
