#include <bits/stdc++.h>
using namespace std;
void testCase() {
  int first, last;
  if (scanf("%d%d", &first, &last) != 2) exit(0);
  last += first;
  int sqr = 1;
  while ((sqr + 1) * (sqr + 1) < last) ++sqr;
  vector<bool> was(last, false);
  long long ans = 0;
  for (; sqr >= 1; --sqr) {
    int div = sqr * sqr;
    int x = first / div + (first % div != 0);
    int val = x * div;
    for (; val < last; ++x, val += div) {
      if (!was[val]) {
        was[val] = true;
        ans += x;
      }
    }
  }
  cout << ans << endl;
}
int main() {
  while (true) testCase();
  return 0;
}
