function Main(input) {
    input = input.split("\n");
    var a = parseInt(input[0].split(" ")[0], 10)
    var b = parseInt(input[0].split(" ")[1], 10)
    var ans = Math.ceil((a - b) / (b - 1)) + 1
    console.log(ans)

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));