#include <bits/stdc++.h>
using namespace std;
int a[10000001];
void Pre() {
  for (int i = 1; i * i < 10000001; ++i) {
    int k = i * i;
    for (int j = k; j < 10000001; j += k) {
      a[j] = k;
    }
  }
}
int main() {
  int n, m;
  Pre();
  while (cin >> n >> m) {
    long long ans = 0;
    for (long long i = 0; i < m; ++i) {
      ans += (i + n) / a[i + n];
    }
    cout << ans << endl;
  }
  return 0;
}
