#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
using namespace std;
const int inf = (int)2e9 + 99999, mod = (int)1e9 + 7;
const long long linf = (long long)2e18 + 99999;
int kob(int x, int y) { return ((long long)x * y) % mod; }
int aza(int x, int y) {
  x -= y;
  if (x < 0) return x + mod;
  return x;
}
int kos(int x, int y) {
  x += y;
  if (x >= mod) return x - mod;
  return x;
}
const int maxn = (int)2e5 + 777, maxn2 = (int)1e6 + 55;
int a[maxn], cnt[maxn];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  for (int i = 2; i <= n; ++i) {
    a[i] -= a[1];
    cnt[a[i] + 1]--;
    cnt[1]++;
  }
  for (int i = 1; i <= (int)2e5; ++i) cnt[i] += cnt[i - 1];
  int now = 0, res = 0;
  for (int i = (int)2e5; i >= 1; --i) {
    if (now + cnt[i] <= k) {
      now += cnt[i];
    } else {
      ++res, now = cnt[i];
    }
  }
  if (now) res++;
  cout << res;
  return 0;
}
