#include <bits/stdc++.h>   using namespace std;   long long N, K;   long long Top, Bot, H[200005], cnt[200005];   long long hcnt[200005];   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cin >> N >> K;     Top = 0, Bot = 2e5;     for (int i = 0; i <= N - 1; i++) {       cin >> H[i];       cnt[H[i]]++;       Top = max(Top, H[i]);       Bot = min(Bot, H[i]);     }     long long curc = 0;     for (int i = Top; i >= 1; i--) {       curc += cnt[i];       hcnt[i] += curc;     }     long long cutt = 0;     int ans = 0;     for (int i = Top; i >= Bot + 1; i--) {       if (cutt + hcnt[i] > K) {         ans++;         cutt = hcnt[i];       } else         cutt += hcnt[i];     }     if (cutt) ans++;     cout << ans <<   n ;     return 0;   }   