#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  long long a[n];
  std::vector<long long> sum(200007, 0);
  long long hm = 200007;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    hm = min(hm, a[i]);
    sum[1]++;
    sum[a[i] + 1]--;
  }
  for (int i = 1; i < 200007; i++) {
    sum[i] = sum[i] + sum[i - 1];
  }
  for (int i = 200005; i >= 0; i--) {
    sum[i] = sum[i] + sum[i + 1];
  }
  long long ans = 0;
  long long status = 0;
  int flag = 1;
  long long aa = 200006;
  std::vector<long long>::iterator low1, low2, low3;
  while (flag) {
    while (status >= sum[aa - 1]) {
      aa--;
    }
    if (aa - 1 <= hm) {
      flag = 0;
    }
    status = sum[aa] + k;
    ans++;
  }
  cout << ans - 1 << endl;
  return;
}
int main() {
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
