import std.stdio, std.algorithm, std.string, std.conv, std.array, std.range, std.math;
int read() { return readln.chomp.to!int; }
int[] reads() { return readln.split.to!(int[]); }

int Ceil(int x, int y) {
    return x / y + !!(x % y);
}

void solve() {
    int n, k; readf("%d %d\n", &n,&k);
    int[] a = reads();
    writeln(1 + Ceil(n-k, k-1));
}

void main() {
    solve();
    readln;
}