import std.stdio, std.algorithm, std.range, std.conv, std.string, std.math, std.container, std.typecons;
import core.stdc.stdio;
// foreach, foreach_reverse, writeln

void main() {
	int n, k;
	scanf("%d%d", &n, &k);
	int[] a = new int[n];
	foreach (i ; 0..n) scanf("%d", &a[i]);
	int s = 10^^9;
	foreach (x ; a) s = min(s, x);
	int ans = 0;
	int i = 0;
	while (i < n) {
		if (a[i] == s) {
			i++;
			continue;
		}
		ans++;
		int cnt = 0;
		int ti = min(n, i+k);
		foreach (j ; i..ti) {
			if (a[j] == s) cnt++;
		}
		if (cnt == 0 && ti == i+k) {
			i = ti-1;
		} else {
			i = ti;
		}
	}
	writeln(ans);
}