#include <bits/stdc++.h>
using namespace std;
int dirx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int diry[8] = {1, -1, 0, 0, 1, -1, 1, -1};
string tostring(long long n) {
  if (!n) return "0";
  string ans = "";
  while (n != 0) {
    ans += (n % 10) + '0';
    n /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
double toDouble(string s) {
  double ans = 0;
  int i = 0, flag = 0, cnt = 0, ff = 1;
  while (i < s.length()) {
    if (s[i] == '-') {
      ff = -1;
      i++;
      continue;
    }
    if (s[i] == '.') {
      flag = 1;
      i++;
      continue;
    }
    ans *= 10;
    ans += s[i] - '0';
    if (flag) cnt++;
    i++;
  }
  ans *= ff;
  return ans / pow(10, cnt);
}
long long ar[200005], mark[200005];
int binarySearch(int n, long long val) {
  int bg = 1, ed = n, mid, ans = 0;
  while (bg <= ed) {
    mid = (bg + ed) >> 1;
    if (ar[mid] >= val) {
      ans = mid;
      ed = mid - 1;
    } else
      bg = mid + 1;
  }
  return ans;
}
long long ans_me(int n, long long mini, long long k) {
  long long cnt = 0, ans = 0;
  for (int i = n; i >= 1 && ar[i] > mini; i--) {
    int j = i;
    while (ar[j] == ar[i] && j >= 1) j--;
    j++;
    long long t = n - j + 1;
    if (cnt + t > k) {
      ans++;
      cnt = t;
    } else
      cnt += t;
    i = j;
  }
  if (cnt) ans++;
  return ans;
}
long long solve(int n, long long mini, long long k) {
  long long cnt = 0, ans = 0;
  int i = 1;
  while (ar[i] == ar[1] && i <= n) i++;
  int p = i;
  for (; i <= n; i++) {
    int j = i;
    while (ar[j] == ar[i] && j <= n) j++;
    j--;
    long long t = j - p + 1;
    if (cnt + t > k) {
      ans++;
      cnt = t;
    } else
      cnt += t;
    i = j;
  }
  if (cnt) ans++;
  return ans;
}
vector<long long> v;
void go(int n, long long k, long long mini, long long maxi) {
  long long cnt = 0;
  for (long long i = maxi; i > mini; i--) {
    long long t = mark[i];
    cnt += t;
    v.push_back(cnt);
  }
  cnt = 0;
  long long ans = 0;
  for (int i = 0; i < v.size(); i++) {
    if (cnt + v[i] > k) {
      ans++;
      cnt = v[i];
    } else
      cnt += v[i];
  }
  if (cnt) ans++;
  cout << ans << endl;
}
int main() {
  int n;
  long long k, mini = 2e9, maxi = 0;
  scanf("%d", &n);
  scanf("%lld", &k);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &ar[i]);
    mini = min(mini, ar[i]);
    maxi = max(maxi, ar[i]);
    mark[ar[i]]++;
  }
  go(n, k, mini, maxi);
  return 0;
}

### Prompt

Construct a cpp code solution to the problem outlined:

There is a toy building consisting of n towers. Each tower consists of several cubes standing on each other. The i-th tower consists of h_i cubes, so it has height h_i.

Let's define operation slice on some height H as following: for each tower i, if its height is greater than H, then remove some top cubes to make tower's height equal to H. Cost of one "slice" equals to the total number of removed cubes from all towers.

Let's name slice as good one if its cost is lower or equal to k (k ≥ n).

<image>

Calculate the minimum number of good slices you have to do to make all towers have the same height. Of course, it is always possible to make it so.

Input

The first line contains two integers n and k (1 ≤ n ≤ 2 ⋅ 10^5, n ≤ k ≤ 10^9) — the number of towers and the restriction on slices, respectively.

The second line contains n space separated integers h_1, h_2, ..., h_n (1 ≤ h_i ≤ 2 ⋅ 10^5) — the initial heights of towers.

Output

Print one integer — the minimum number of good slices you have to do to make all towers have the same heigth.

Examples

Input

5 5
3 1 2 2 4


Output

2


Input

4 5
2 3 4 5


Output

2

Note

In the first example it's optimal to make 2 slices. The first slice is on height 2 (its cost is 3), and the second one is on height 1 (its cost is 4).

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int dirx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int diry[8] = {1, -1, 0, 0, 1, -1, 1, -1};
string tostring(long long n) {
  if (!n) return "0";
  string ans = "";
  while (n != 0) {
    ans += (n % 10) + '0';
    n /= 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
double toDouble(string s) {
  double ans = 0;
  int i = 0, flag = 0, cnt = 0, ff = 1;
  while (i < s.length()) {
    if (s[i] == '-') {
      ff = -1;
      i++;
      continue;
    }
    if (s[i] == '.') {
      flag = 1;
      i++;
      continue;
    }
    ans *= 10;
    ans += s[i] - '0';
    if (flag) cnt++;
    i++;
  }
  ans *= ff;
  return ans / pow(10, cnt);
}
long long ar[200005], mark[200005];
int binarySearch(int n, long long val) {
  int bg = 1, ed = n, mid, ans = 0;
  while (bg <= ed) {
    mid = (bg + ed) >> 1;
    if (ar[mid] >= val) {
      ans = mid;
      ed = mid - 1;
    } else
      bg = mid + 1;
  }
  return ans;
}
long long ans_me(int n, long long mini, long long k) {
  long long cnt = 0, ans = 0;
  for (int i = n; i >= 1 && ar[i] > mini; i--) {
    int j = i;
    while (ar[j] == ar[i] && j >= 1) j--;
    j++;
    long long t = n - j + 1;
    if (cnt + t > k) {
      ans++;
      cnt = t;
    } else
      cnt += t;
    i = j;
  }
  if (cnt) ans++;
  return ans;
}
long long solve(int n, long long mini, long long k) {
  long long cnt = 0, ans = 0;
  int i = 1;
  while (ar[i] == ar[1] && i <= n) i++;
  int p = i;
  for (; i <= n; i++) {
    int j = i;
    while (ar[j] == ar[i] && j <= n) j++;
    j--;
    long long t = j - p + 1;
    if (cnt + t > k) {
      ans++;
      cnt = t;
    } else
      cnt += t;
    i = j;
  }
  if (cnt) ans++;
  return ans;
}
vector<long long> v;
void go(int n, long long k, long long mini, long long maxi) {
  long long cnt = 0;
  for (long long i = maxi; i > mini; i--) {
    long long t = mark[i];
    cnt += t;
    v.push_back(cnt);
  }
  cnt = 0;
  long long ans = 0;
  for (int i = 0; i < v.size(); i++) {
    if (cnt + v[i] > k) {
      ans++;
      cnt = v[i];
    } else
      cnt += v[i];
  }
  if (cnt) ans++;
  cout << ans << endl;
}
int main() {
  int n;
  long long k, mini = 2e9, maxi = 0;
  scanf("%d", &n);
  scanf("%lld", &k);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &ar[i]);
    mini = min(mini, ar[i]);
    maxi = max(maxi, ar[i]);
    mark[ar[i]]++;
  }
  go(n, k, mini, maxi);
  return 0;
}

```