#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:164777216")
using namespace std;
template <typename T>
int size(T& a) {
  return (int)a.size();
}
template <typename T>
T sqr(T a) {
  return a * a;
}
bool gr(double a, double b) { return a > b + 1e-9; }
bool ls(double a, double b) { return a + 1e-9 < b; }
bool eq(double a, double b) { return fabs(a - b) < 1e-9; }
bool isDigit(char ch) { return ch >= '0' && ch <= '9'; }
struct LongInt {
  static const int MAXLEN = 60;
  static const int BASE = 1000;
  int currentLen;
  int digit[MAXLEN];
  int getDigitLen();
  LongInt();
  LongInt(int a);
  LongInt(char* s);
  void clear();
  void init(int a);
  void init(char* s);
  LongInt operator*(const LongInt& o) const;
  LongInt operator+(const LongInt& o) const;
  LongInt operator-(const LongInt& o) const;
  void output();
  void outputDigit(int val, bool outputZeros);
  bool operator<(const LongInt& o) const;
  bool operator==(const LongInt& o) const;
  bool operator<=(const LongInt& o) const;
  bool operator>=(const LongInt& o) const;
};
bool LongInt::operator<(const LongInt& o) const {
  if (this->currentLen != o.currentLen) {
    return this->currentLen < o.currentLen;
  }
  for (int i = (this->currentLen) - 1; i >= (0); --i) {
    if (this->digit[i] != o.digit[i]) {
      return this->digit[i] < o.digit[i];
    }
  }
  return false;
}
bool LongInt::operator==(const LongInt& o) const {
  if (this->currentLen != o.currentLen) {
    return false;
  }
  for (int i = (this->currentLen) - 1; i >= (0); --i) {
    if (this->digit[i] != o.digit[i]) {
      return false;
    }
  }
  return true;
}
bool LongInt::operator<=(const LongInt& o) const {
  return *this < o || *this == o;
}
bool LongInt::operator>=(const LongInt& o) const { return !(*this < o); }
LongInt::LongInt() {}
LongInt::LongInt(int a) { init(a); }
LongInt::LongInt(char* s) { init(s); }
int LongInt::getDigitLen() {
  int ret = 0;
  int tmp = 1;
  while (tmp < BASE) {
    ret++;
    tmp *= 10;
  }
  return ret;
}
void LongInt::clear() {
  currentLen = 0;
  memset((digit), (0), sizeof(digit));
}
void LongInt::init(int a) {
  clear();
  do {
    digit[currentLen++] = a % BASE;
    a /= BASE;
  } while (a > 0);
}
void LongInt::init(char* s) {
  clear();
  int len = strlen(s);
  int digitLen = getDigitLen();
  for (int i = len - 1; i >= 0; i -= digitLen) {
    int currentNumber = 0;
    for (int j = digitLen - 1; j >= 0; j--) {
      currentNumber = 10 * currentNumber + (i - j >= 0 ? s[i - j] - '0' : 0);
    }
    digit[currentLen++] = currentNumber;
  }
}
LongInt LongInt::operator+(const LongInt& o) const {
  LongInt ret;
  ret.clear();
  int pp = 0;
  while (ret.currentLen < currentLen || ret.currentLen < o.currentLen || pp) {
    ret.digit[ret.currentLen] =
        pp + (ret.currentLen < currentLen ? digit[ret.currentLen] : 0) +
        (ret.currentLen < o.currentLen ? o.digit[ret.currentLen] : 0);
    pp = ret.digit[ret.currentLen] / BASE;
    ret.digit[ret.currentLen++] %= BASE;
  }
  return ret;
}
LongInt LongInt::operator*(const LongInt& o) const {
  LongInt ret;
  ret.clear();
  for (int i = (0); i < (currentLen); ++i)
    for (int j = (0); j < (o.currentLen); ++j) {
      ret.digit[i + j] += digit[i] * o.digit[j];
    }
  int pp = 0;
  while (pp || ret.currentLen < (currentLen + o.currentLen - 1)) {
    ret.digit[ret.currentLen] += pp;
    pp = ret.digit[ret.currentLen] / BASE;
    ret.digit[ret.currentLen++] %= BASE;
  }
  return ret;
}
void LongInt::outputDigit(int number, bool outputZeros) {
  int digitLen = getDigitLen();
  if (outputZeros) {
    cout << setfill('0') << setw(digitLen) << number;
  } else {
    cout << number;
  }
}
void LongInt::output() {
  outputDigit(digit[currentLen - 1], false);
  for (int i = (currentLen - 1) - 1; i >= (0); --i) {
    outputDigit(digit[i], true);
  }
}
LongInt LongInt::operator-(const LongInt& o) const {
  LongInt ret;
  ret.currentLen = this->currentLen;
  for (int i = (0); i < (this->currentLen); ++i) {
    ret.digit[i] = this->digit[i] - o.digit[i];
  }
  for (int i = (0); i < (ret.currentLen); ++i) {
    while (ret.digit[i] < 0) {
      ret.digit[i] += BASE;
      ret.digit[i + 1]--;
    }
  }
  while (ret.currentLen > 1 && ret.digit[ret.currentLen - 1] == 0)
    ret.currentLen--;
  return ret;
}
struct LineReader {
  static const int MAXLEN = 1000;
  char line[MAXLEN];
  int currentPos;
  int currentLen;
  void clear();
  void readLine();
  int readInt();
  LongInt readLongInt();
};
void LineReader::clear() {
  currentPos = currentLen = 0;
  line[0] = 0;
}
void LineReader::readLine() {
  gets(line);
  currentLen = strlen(line);
  currentPos = 0;
}
int LineReader::readInt() {
  int ret = 0;
  while (1) {
    while (currentPos < currentLen && !isDigit(line[currentPos])) currentPos++;
    if (currentPos == currentLen) {
      readLine();
      continue;
    }
    while (currentPos < currentLen && isDigit(line[currentPos])) {
      ret *= 10;
      ret += line[currentPos++] - '0';
    }
    break;
  }
  return ret;
}
LongInt LineReader::readLongInt() {
  char s[MAXLEN];
  memset((s), (0), sizeof(s));
  while (1) {
    while (currentPos < currentLen && !isDigit(line[currentPos])) currentPos++;
    if (currentPos == currentLen) {
      readLine();
      continue;
    }
    int i = 0;
    while (currentPos < currentLen && isDigit(line[currentPos])) {
      s[i++] = line[currentPos++];
    }
    break;
  }
  LongInt ret;
  ret.init(s);
  return ret;
}
LineReader reader;
bool nprime[10000010];
int add[10000010];
void testSolve() {
  int a, n;
  cin >> a >> n;
  long long ans = 0;
  int b = a + n;
  if (a == 1) ans++;
  for (int i = (2); i < (b); ++i) {
    if (nprime[i]) {
      if (i >= a) ans += add[i];
      continue;
    }
    if (i >= a) ans += i;
    for (int j = i << 1; j < b; j += i) {
      nprime[j] = 1;
      int& a = add[j];
      if (a == 0) a = 1;
      if (j / i < i) {
        a *= i;
      } else {
        int ii = i * i;
        int jj = j;
        while (jj % ii == 0) jj /= ii;
        if (jj % i == 0) a *= i;
      }
    }
  }
  cout << ans;
}
void testInit() {}
void testOutput() {}
void testScan() {}
void globalInit() {}
void solveOneTest() {
  testInit();
  testScan();
  testSolve();
  testOutput();
}
void solveMultiTest() {
  char inputString[100];
  int testCount;
  gets(inputString);
  sscanf(inputString, "%d", &testCount);
  for (int testNumber = (0); testNumber < (testCount); ++testNumber) {
    solveOneTest();
  }
}
int main() {
  globalInit();
  solveOneTest();
}
