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

void main() {
    auto tmp = readln.split.to!(long[]);
    auto N = tmp[0], K = tmp[1];
    const as = readln.split.to!(long[]);
    const i = N.iota.find!(i => as[i] == 1).front;

    int cnt = 0;
    if (N > 0) {
        N -= K;
        cnt++;
    }
    while (N > 0) {
        N -= K-1;
        cnt++;
    }
    writeln(cnt);
}
