#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 100;
long long cube[maxn], aa[maxn] = {0}, bb[maxn] = {0}, re[maxn] = {0};
bool cmp(int a, int b) { return a > b; }
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> cube[i];
  }
  sort(cube, cube + n, cmp);
  for (int i = 0; i < n; i++) {
    cube[i] -= cube[n - 1];
  }
  for (int i = 0; i < n; i++) {
    re[cube[i]]++;
    for (int j = cube[i] - 1; j >= cube[i + 1]; j--) {
      re[j] = re[cube[i]];
    }
  }
  long long sum = 0, cnt = 0;
  for (int i = maxn - 1; i >= 1; i--) {
    sum += re[i];
    if (sum > k) {
      cnt++;
      sum = 0;
      i++;
    }
  }
  if (sum > 0) cnt++;
  cout << cnt << endl;
  return 0;
}
