#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, n, b;
  cin >> a >> n;
  b = a + n;
  vector<int> mindiv(b, 0), pr;
  for (long long i = 2; i < b; ++i) {
    if (mindiv[i] == 0) {
      mindiv[i] = i;
      pr.push_back(i);
    }
    for (int j = 0; j < pr.size() && pr[j] <= mindiv[i] && i * pr[j] < b; j++) {
      mindiv[i * pr[j]] = pr[j];
    }
  }
  long long res = 0;
  for (int icur = a; icur < b; icur++) {
    int cur = icur;
    long long curres = 1;
    while (cur != 1) {
      int curdiv = mindiv[cur], cnt = 0;
      while (cur % curdiv == 0) {
        cnt++;
        cur /= curdiv;
      }
      if (cnt % 2 == 1) curres *= curdiv;
    }
    res += curres;
  }
  cout << res << endl;
  return 0;
}
