#include <bits/stdc++.h>
using namespace std;
template <class T>
struct rge {
  T b, e;
};
template <class T>
rge<T> range(T i, T j) {
  return rge<T>{i, j};
}
struct debug {
  template <class T>
  debug& operator<<(const T&) {
    return *this;
  }
};
using ll = long long;
template <typename T>
void min_self(T& a, T b) {
  a = min(a, b);
}
template <typename T>
void max_self(T& a, T b) {
  a = max(a, b);
}
const int inf = 1e9 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  if (k == 1) {
    cout << "3\n";
    exit(0);
  }
  vector<int> phi(n + 1);
  for (int i = 0; i <= n; i++) {
    phi[i] = i;
  }
  for (int i = 2; i <= n; i++) {
    if (phi[i] == i) {
      --phi[i];
      for (int j = i + i; j <= n; j += i) {
        phi[j] = (phi[j] / i) * (i - 1);
      }
    }
  }
  debug() << "[ "
          << "phi"
             ": "
          << (phi) << " ] ";
  k += 2;
  sort(phi.begin() + 1, phi.end());
  long long ans = 0;
  for (int i = 1; i <= k; i++) {
    ans += phi[i];
  }
  cout << ans << "\n";
}

### Prompt

Construct a CPP code solution to the problem outlined:

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;
template <class T>
struct rge {
  T b, e;
};
template <class T>
rge<T> range(T i, T j) {
  return rge<T>{i, j};
}
struct debug {
  template <class T>
  debug& operator<<(const T&) {
    return *this;
  }
};
using ll = long long;
template <typename T>
void min_self(T& a, T b) {
  a = min(a, b);
}
template <typename T>
void max_self(T& a, T b) {
  a = max(a, b);
}
const int inf = 1e9 + 5;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  if (k == 1) {
    cout << "3\n";
    exit(0);
  }
  vector<int> phi(n + 1);
  for (int i = 0; i <= n; i++) {
    phi[i] = i;
  }
  for (int i = 2; i <= n; i++) {
    if (phi[i] == i) {
      --phi[i];
      for (int j = i + i; j <= n; j += i) {
        phi[j] = (phi[j] / i) * (i - 1);
      }
    }
  }
  debug() << "[ "
          << "phi"
             ": "
          << (phi) << " ] ";
  k += 2;
  sort(phi.begin() + 1, phi.end());
  long long ans = 0;
  for (int i = 1; i <= k; i++) {
    ans += phi[i];
  }
  cout << ans << "\n";
}

```