#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = (int)1e5 + 5;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  long long int n, K;
  cin >> n >> K;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  long long int mn = a[0];
  vector<int> v;
  long long int cnt = 0;
  if (n == K) {
    cout << "1" << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == mn && mn != a[n - 1]) {
      cnt++;
      long long int ff = K - 1;
      a[i + ff] = mn;
    }
    i += (K - 2);
  }
  cout << cnt << endl;
  return 0;
}
