#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const double INF = 1e12, EPS = 1e-9;
long long precalc[110] = {
    3289873881,   9868665529,   16449605905,  23026669238,  29609419637,
    36189255344,  42774216122,  49342083962,  55925672664,  62508559263,
    69094233047,  75657300987,  82250581915,  88823471687,  95410337404,
    101996406408, 108556716709, 115151286333, 121743572609, 128317508498,
    134846183630, 141470260321, 148004248777, 154644774056, 161207123377,
    167787322948, 174354926635, 180939338010, 187524139632, 194089478286,
    200688484484, 207274356120, 213848372738, 220424880893, 227034880100,
    233562524829, 240121988572, 246796910433, 253333410551, 259947586355,
    266446905394, 273009842344, 279690578887, 286188007278, 292809363948,
    299316602019, 305960087050, 312581161018, 319114910554, 325636830891,
    332307524262, 338837565208, 345365832717, 352062933520, 358565353535,
    365234122267, 371735704502, 378315481340, 384933634381, 391491812661,
    398085159032, 404625550118, 411210560174, 417868555380, 424419075908,
    430987625632, 437557391544, 444247290641, 450621742789, 457341752735,
    463821941729, 470417349760, 477020745058, 483559292878, 490111117040,
    496759254857, 503410197313, 509964975758, 516503641994, 523053657401,
    529690086938, 536258601136, 542776549240, 549438379756, 555940177315,
    562518174464, 569166423964, 575699524634, 582436514617, 588906630983,
    595357847851, 602079352926, 608702358948, 615285848588, 621916382223,
    628244706633, 635087167279, 641526352015, 648038202363, 654725155424,
    661312144925, 667864023753, 674275616518, 681012134144, 687608499087,
    694039250396, 700781268384, 707373808968, 713978807169, 720433109150};
inline int calc(int n) {
  int res = 1;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      int cnt = 0;
      while (n % i == 0) n /= i, cnt++;
      if (cnt % 2) res *= i;
    }
  if (n > 1) res *= n;
  return res;
}
void run() {
  int a, n, b;
  cin >> a >> n;
  b = a + n;
  long long ans = 0;
  while (a < b && a % 100000) ans += calc(a++);
  while (a < b && b % 100000) ans += calc(--b);
  a /= 100000;
  b /= 100000;
  while (a < b) ans += precalc[a++];
  cout << ans << endl;
}
int main() { run(); }
