function Main(input){
    input = input.split("\n");
    var [p,k] = input[0].split(" ");
    var arr = input[1].split(" ");
    var n = arr.length;
    console.log(Math.ceil((n-1)/(k-1)));
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
