#include <bits/stdc++.h>
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline void sub(long long &a, long long b) {
  a -= b;
  if (a < 0) a += 1000000007;
}
inline void add(long long &a, long long b) {
  a += b;
  if (a >= 1000000007) a -= 1000000007;
}
template <typename T>
inline T const &MAX(T const &a, T const &b) {
  return a > b ? a : b;
}
template <typename T>
inline T const &MIN(T const &a, T const &b) {
  return a < b ? a : b;
}
inline long long qp(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % 1000000007;
    a = a * a % 1000000007, b >>= 1;
  }
  return ans;
}
inline long long qp(long long a, long long b, long long c) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % c;
    a = a * a % c, b >>= 1;
  }
  return ans;
}
using namespace std;
const unsigned long long ba = 233;
const double eps = 1e-6;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int N = 10000000 + 10, maxn = 1000000 + 10, inf = 0x3f3f3f3f;
int prime[N], cnt, f[N];
bool mark[N], num[N];
void init() {
  f[1] = 1;
  for (int i = 2; i < N; i++) {
    if (!mark[i]) prime[++cnt] = i, f[i] = i, num[i] = 1;
    for (int j = 1; j <= cnt && i * prime[j] < N; j++) {
      mark[i * prime[j]] = 1;
      if (i % prime[j] == 0) {
        num[i * prime[j]] = num[i] ^ 1;
        if (num[i])
          f[i * prime[j]] = f[i] / prime[j];
        else
          f[i * prime[j]] = f[i] * prime[j];
        break;
      }
      num[i * prime[j]] = 1;
      f[i * prime[j]] = f[i] * prime[j];
    }
  }
}
int main() {
  init();
  int a, b;
  scanf("%d%d", &a, &b);
  long long ans = 0;
  for (int i = a; i < b + a; i++) ans += f[i];
  printf("%lld\n", ans);
  return 0;
}
