function Main(input) {
    var ud = input.split('\n');
    var uu = ud[0].split(' ');
    var dd = ud[1].split(' ');

    var N = Number(uu[0]);
    var K = Number(uu[1]);
    var A = dd.map((n) => Number(n));
    var oneIdx = A.indexOf(1);
    var Alen = A.length;
    console.log(Math.ceil((N - K) / (K - 1) + 1));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
