import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(int k, int[] xs) {
    int ans = 0; // k 個のグループの個数
    int p = 0;
    while (p+1 < xs.length) {
        p += k - 1;
        ans++;
    }
    return ans;
}

void main() {
    auto nk = readints;
    int k = nk[1];
    auto xs = readints;

    auto ans = calc(k, xs);
    writeln(ans);
}

