#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, ans = 0, k, c = 1e10, l = 0;
  cin >> n >> k;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    c = min(c, a[i]);
  }
  for (long long i = 0; i < n; i++) {
    if (c == a[i]) {
      ans++;
      i += k - (l + 1) - 1;
      l = 0;
      continue;
    }
    if (c != a[i]) l++;
    if (l == k) {
      ans++;
      l = 1;
    }
  }
  if (l) ans++;
  cout << ans;
}
