#include <bits/stdc++.h>
using namespace std;
bool exitInput = false;
int ntest = 1, itest = 1;
const char* directions[4] = {"NE", "SE", "SW", "NW"};
const long long Mod = 1000000000LL + 7;
const int maxn = 100 + 2;
const int maxv = 1000000 + 5;
const int maxe = 600000 + 5;
const int root = 1;
int a, n, b;
int isprime[1250002];
int base_prime[10000000 + 1], ans[10000000 + 1];
long long res;
void sieve(int gh) {
  int i, j, k, x;
  int nBytes = gh / 8 + 1;
  isprime[0] = 0xFC;
  for (i = 1; i <= nBytes; ++i) {
    isprime[i] = 0xFF;
  }
  for (i = 2; i <= gh; ++i) {
    j = i >> 3;
    k = i - (j << 3);
    if (isprime[j] & (1 << k)) {
      for (x = i + i; x <= gh; x += i) {
        j = x >> 3;
        k = x - (j << 3);
        isprime[j] &= ~(1 << k);
        base_prime[x] = i;
      }
      base_prime[i] = i;
    }
  }
}
int main() {
  int i, j, k, t;
  scanf("%d %d", &a, &n);
  b = a + n - 1;
  sieve(b);
  res = 0;
  ans[1] = 1;
  for (i = 2; i <= b; ++i) {
    if (base_prime[i] == i) {
      ans[i] = i;
    } else {
      t = j = i / base_prime[i];
      k = 0;
      while (j % base_prime[i] == 0) {
        j /= base_prime[i];
        ++k;
      }
      j = t;
      if (k & 1)
        ans[i] = ans[j] / base_prime[i];
      else
        ans[i] = ans[j] * base_prime[i];
    }
  }
  for (i = a; i <= b; ++i) {
    res += ans[i];
  }
  printf("%lld\n", res);
  return 0;
}
