#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long MAX = 1e6 + 5;
long long np[MAX];
long long koszt[MAX];
long long n, k;
long long ilepom[MAX], ile[MAX];
const long long inf = 1e18;
long long licz() {
  set<pair<long long, long long> > secik;
  for (long long i = 3; i <= n; i++) {
    if (ile[i] == 0) secik.insert({koszt[i], i});
  }
  long long res = 0;
  for (long long _ = (0); _ <= ((long long)(k)-1); _++) {
    if (secik.empty()) return inf;
    pair<long long, long long> pom = *secik.begin();
    (pom);
    res += pom.first;
    secik.erase(secik.begin());
    for (long long j = 2; j * pom.second <= n; j++) {
      long long i = j * pom.second;
      koszt[i] -= pom.first;
      ile[i]--;
      if (ile[i] == 0) secik.insert({koszt[i], i});
    }
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  if (0) cout << fixed << setprecision(6);
  cin >> n >> k;
  for (long long i = 3; i <= n; i++) {
    for (long long j = 2; i * j <= n; j++) {
      ilepom[i * j]++;
    }
  }
  for (long long i = (0); i <= ((long long)(n + 1) - 1); i++) {
    koszt[i] = (i % 2 ? i - 1 : inf);
    ile[i] = (i % 2 ? ilepom[i] : inf);
  }
  long long res1 = licz() + 1;
  for (long long i = (0); i <= ((long long)(n + 1) - 1); i++) {
    koszt[i] = i - (i % 2 ? 1 : 2);
    ile[i] = ilepom[i];
  }
  long long res2 = licz() + 2;
  (res1, res2);
  cout << min(res1, res2) << "\n";
}

### Prompt

Create a solution in cpp for the following problem:

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.

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long MAX = 1e6 + 5;
long long np[MAX];
long long koszt[MAX];
long long n, k;
long long ilepom[MAX], ile[MAX];
const long long inf = 1e18;
long long licz() {
  set<pair<long long, long long> > secik;
  for (long long i = 3; i <= n; i++) {
    if (ile[i] == 0) secik.insert({koszt[i], i});
  }
  long long res = 0;
  for (long long _ = (0); _ <= ((long long)(k)-1); _++) {
    if (secik.empty()) return inf;
    pair<long long, long long> pom = *secik.begin();
    (pom);
    res += pom.first;
    secik.erase(secik.begin());
    for (long long j = 2; j * pom.second <= n; j++) {
      long long i = j * pom.second;
      koszt[i] -= pom.first;
      ile[i]--;
      if (ile[i] == 0) secik.insert({koszt[i], i});
    }
  }
  return res;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  if (0) cout << fixed << setprecision(6);
  cin >> n >> k;
  for (long long i = 3; i <= n; i++) {
    for (long long j = 2; i * j <= n; j++) {
      ilepom[i * j]++;
    }
  }
  for (long long i = (0); i <= ((long long)(n + 1) - 1); i++) {
    koszt[i] = (i % 2 ? i - 1 : inf);
    ile[i] = (i % 2 ? ilepom[i] : inf);
  }
  long long res1 = licz() + 1;
  for (long long i = (0); i <= ((long long)(n + 1) - 1); i++) {
    koszt[i] = i - (i % 2 ? 1 : 2);
    ile[i] = ilepom[i];
  }
  long long res2 = licz() + 2;
  (res1, res2);
  cout << min(res1, res2) << "\n";
}

```