#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
int main() {
  int i, j, n, a, b;
  cin >> a >> b;
  n = a + b;
  vector<int> sqr;
  vector<pair<bool, int> > ans;
  ans.resize(n);
  sqr.resize(3163);
  for (i = 1; i <= 3163; i++) {
    sqr[i - 1] = i * i;
  }
  int x;
  for (i = 3162; i >= 1; i--) {
    x = 1;
    for (j = sqr[i]; j < n; j += sqr[i]) {
      if (!ans[j].first) {
        ans[j].first = true;
        ans[j].second = x;
      }
      x++;
    }
  }
  long long sum = 0;
  for (i = a; i < n; i++) {
    if (ans[i].first) {
      sum += ans[i].second;
    } else {
      sum += i;
    }
  }
  cout << sum;
  return 0;
}
