import std.stdio;
import std.string;
import std.conv;
import std.algorithm;

void main() {
    int[] buf = readln.chomp.split.to!(int[]);
    int n = buf[0], k = buf[1];
    int[] arr = readln.chomp.split.to!(int[]);

    int ans = 0;
    n -= 1;
    while (n > 0) {
        n -= k - 1;
        ans++;
    }

    writeln(ans);
}