#include <bits/stdc++.h>
using namespace std;
const int INFint = 2e9;
const long long INF = 2e18;
const long long MOD = 1000000007ll;
const int N = 10000001;
long long f[N];
long long can[N];
int main() {
  ios_base::sync_with_stdio(0);
  long long a, n;
  cin >> a >> n;
  for (int i = 1; i <= N; i++) {
    if (1ll * i * i <= N) can[i * i] = 1;
    if (can[i]) {
      for (int j = i; j <= N; j += i) f[j] = i;
    }
  }
  long long ans = a / f[a];
  for (int i = 1; i <= n - 1; i++) {
    long long x = a + i;
    ans += x / f[x];
  }
  cout << ans;
  fprintf(stderr, "\nTIME = %lf\n", 1.0 * clock() / CLOCKS_PER_SEC);
  ;
  return 0;
}
