#include <bits/stdc++.h>
std::vector<int> x;
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  b += a;
  x.resize(b - a);
  for (int i = a; i < b; ++i) x[i - a] = i;
  const int MAX_P = 10000;
  std::array<char, MAX_P> u;
  for (int i = 2; i < u.size(); ++i) {
    if (!u[i]) {
      for (int j = i; j < u.size(); j += i) u[j] = 1;
      int step = i * i;
      int start = ((a - 1) / step + 1) * step;
      for (int j = start; j < b; j += step) {
        int& res = x[j - a];
        while (res % step == 0) res /= step;
      }
    }
  }
  std::cout << accumulate(x.begin(), x.end(), 0ull) << std::endl;
}
