#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int phi[N];
void pre(int n) {
  iota(phi, phi + n + 1, 0);
  for (int i = 2; i <= n; i++) {
    if (phi[i] == i) {
      phi[i] = i - 1;
      for (int j = 2 * i; j <= n; j += i) {
        (phi[j] /= i) *= (i - 1);
      }
    }
  }
}
void solve() {
  int n, k;
  cin >> n >> k;
  if (k == 1) {
    cout << 3;
    return;
  }
  pre(n);
  sort(phi + 1, phi + n + 1);
  long long res = 0;
  for (int i = 1; i <= k + 2; i++) {
    res += phi[i];
  }
  cout << res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  cout << endl;
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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>
using namespace std;
const int N = 1e6 + 10;
int phi[N];
void pre(int n) {
  iota(phi, phi + n + 1, 0);
  for (int i = 2; i <= n; i++) {
    if (phi[i] == i) {
      phi[i] = i - 1;
      for (int j = 2 * i; j <= n; j += i) {
        (phi[j] /= i) *= (i - 1);
      }
    }
  }
}
void solve() {
  int n, k;
  cin >> n >> k;
  if (k == 1) {
    cout << 3;
    return;
  }
  pre(n);
  sort(phi + 1, phi + n + 1);
  long long res = 0;
  for (int i = 1; i <= k + 2; i++) {
    res += phi[i];
  }
  cout << res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  cout << endl;
}

```