#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 29;
inline int two(int n) { return 1 << n; }
inline int test(int n, int b) { return n & two(b); }
inline void set_bit(int& n, int b) { n |= two(b); }
inline void unset_bit(int& n, int b) { n &= ~two(b); }
inline int last_bit(int n) { return n & (-n); }
inline int ones(int n) {
  int res = 0;
  while (n && ++res) n -= n & (-n);
  return res;
}
template <class T>
void chmax(T& a, const T& b) {
  a = max(a, b);
}
template <class T>
void chmin(T& a, const T& b) {
  a = min(a, b);
}
const int MAX = 10000007;
int a, n, dv[MAX];
int main() {
  cin >> a >> n;
  for (int i = 2; i * i < MAX; ++i)
    if (!dv[i]) {
      int sq = i * i;
      for (int j = sq; j < MAX; j += sq) dv[j] = sq;
    }
  long long res = 0;
  for (int i = 1; i < a + n; ++i)
    if (!dv[i]) {
      if (i >= a) res += i;
      dv[i] = i;
    } else {
      if (i >= a) res += dv[i / dv[i]];
      dv[i] = dv[i / dv[i]];
    }
  cout << res << endl;
  return 0;
}
