You are given two integers n and k.

You need to construct k regular polygons having same [circumcircle](https://en.wikipedia.org/wiki/Circumscribed_circle), with distinct number of sides l between 3 and n. 

<image> Illustration for the first example.

You can rotate them to minimize the total number of distinct points on the circle. Find the minimum number of such points.

Input

The only line of input contains two integers n and k (3 ≤ n ≤ 10^{6}, 1 ≤ k ≤ n-2), the maximum number of sides of a polygon and the number of polygons to construct, respectively.

Output

Print a single integer — the minimum number of points required for k polygons.

Examples

Input


6 2


Output


6


Input


200 50


Output


708

Note

In the first example, we have n = 6 and k = 2. So, we have 4 polygons with number of sides 3, 4, 5 and 6 to choose from and if we choose the triangle and the hexagon, then we can arrange them as shown in the picture in the statement.

Hence, the minimum number of points required on the circle is 6, which is also the minimum overall possible sets.
#include <bits/stdc++.h>
using namespace std;
int TestMillerRabin[12] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37};
long long mulmod(long long a, long long b, long long p) {
  long long x = 0, y = a % p;
  while (b > 0) {
    if (b % 2 == 1) x = (x + y) % p;
    y = (1LL * y * 2) % p;
    b = b / 2;
  }
  return x % p;
}
long long fastexp(long long x, long long y, long long p) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (1LL * ans * x) % p;
    y = y >> 1;
    x = (1LL * x * x) % p;
  }
  return ans % p;
}
long long fastexpp(long long x, long long y, long long p) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = mulmod(ans, x, p);
    y = y >> 1;
    x = mulmod(x, x, p);
  }
  return ans % p;
}
long long invmod(long long x, long long p) { return fastexp(x, p - 2, p) % p; }
bool check_composite(long long n, long long a, long long d, int s) {
  long long x = fastexp(a, d, n);
  if (x == 1 || x == n - 1) return false;
  for (int r = 1; r < s; r++) {
    x = (1LL * x * x) % n;
    if (x == n - 1) return false;
  }
  return true;
}
bool isPrime(long long p) {
  if (p <= 1) return false;
  int r = 0;
  long long d = p - 1;
  while (!(d & 1)) {
    d >>= 1;
    r++;
  }
  for (int i = 0; i < 12; i++) {
    int value = TestMillerRabin[i];
    if (p == value) return true;
    if (check_composite(p, value, d, r)) return false;
  }
  return true;
}
int lpf[1000005];
int divisors[1000005];
void sieve() {
  for (int i = 2; i < 1000005; i++) {
    if (!lpf[i]) {
      lpf[i] = i;
      for (long long j = 1LL * i * i; j < 1000005; j += i) {
        if (lpf[j] == 0) lpf[j] = i;
      }
    }
  }
}
int phi[1000005];
void cphi() {
  phi[1] = 1;
  for (int i = 2; i < 1000005; i++) {
    if (!phi[i]) {
      phi[i] = i - 1;
      for (long long j = 2 * i; j < 1000005; j += i) {
        if (phi[j] == 0) phi[j] = j;
        phi[j] = phi[j] / i * (i - 1);
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  sieve();
  cphi();
  int n, k;
  cin >> n >> k;
  if (k == 1)
    cout << 3;
  else {
    sort(phi + 1, phi + n + 1);
    long long ans = 0;
    for (int i = 1; i <= k + 2; i++) ans += phi[i];
    cout << ans;
  }
  return 0;
}
