#include <bits/stdc++.h>
int N, A, P;
int months[20000001];
int square(int x) {
  if ((int)sqrt(x) * (int)sqrt(x) == x) return 1;
  return 0;
}
void initialize() {
  months[1] = 1;
  for (int i = 2; i <= (N + A); i++) {
    if (square(i)) {
      for (int j = i + i; j <= (N + A); j += i) {
        months[j] = j / i;
      }
      months[i] = 1;
    }
    if ((months[i] == 0) || (months[i] > i)) {
      months[i] = i;
    }
  }
}
int main() {
  scanf("%d %d", &A, &N);
  initialize();
  long long int sum = 0;
  for (int i = A; i < (N + A); i++) {
    sum += months[i];
  }
  printf("%I64d", sum);
  return 0;
}
