#include <bits/stdc++.h>
const double eps = 1e-9;
const int int_inf = 2000000000;
const long long i64_inf = 1000000000000000000LL;
const double pi = acos(-1.0);
using namespace std;
int c[10000010];
bool isSq[10000010];
long long res = 0;
int a, n;
int main() {
  cin >> a >> n;
  for (int i = a; i <= a + n - 1; i++) c[i] = i;
  memset(isSq, 0, sizeof(isSq));
  for (int i = 2; i < a + n; i++)
    if (isSq[i]) {
      for (int j = i; j < a + n; j += i) c[j] = min(c[j], j / i);
      long long I = i;
      if (I * I < (long long)(a + n)) isSq[i * i] = 1;
    } else {
      long long I = i;
      if (I * I < (long long)(a + n)) isSq[i * i] = 1;
    }
  for (int i = a; i < a + n; i++) res += c[i];
  cout << res << endl;
  return 0;
}
