#include <bits/stdc++.h>
using namespace std;
int divisor[10000000 + 1];
int main() {
  for (int i = 2; i * i <= 10000000; ++i) {
    if (divisor[i]) {
      continue;
    }
    for (int j = i * i; j <= 10000000; j += i) {
      divisor[j] = i;
    }
  }
  int a, n;
  cin >> a >> n;
  long long ans = 0;
  for (int i = a; i <= a + n - 1; ++i) {
    int j = i, cur = 1;
    while (divisor[j] != 0) {
      int d = divisor[j], count = 0;
      while (j % d == 0) {
        j /= d;
        ++count;
      }
      if (count % 2 == 1) {
        cur *= d;
      }
    }
    ans += cur * j;
  }
  cout << ans << endl;
  return 0;
}
