#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e7 + 10, maxl = 20, mod = 1e9 + 7, base = 737,
                inf = 2e18 + 13;
int a, n, res[maxn], t[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> a >> n;
  for (int i = 2; i < a + n; i++)
    if (!t[i]) {
      t[i] = i;
      for (long long j = 1ll * i * i; j < a + n; j += i) t[j] = i;
    }
  res[1] = 1;
  for (int i = 2; i < a + n; i++) {
    res[i] = res[i / t[i]];
    if (res[i] % t[i])
      res[i] *= t[i];
    else
      res[i] /= t[i];
  }
  long long ans = 0;
  for (int i = a; i < a + n; i++) ans += res[i];
  cout << ans << endl;
  return 0;
}
