fun main(args: Array<String>) {
    val (N, K) = readLine()!!.split(" ").map(String::toDouble)
    val As = readLine()!!.split(" ").map(String::toInt)
    
    println(Math.ceil((N - 1) / (K - 1)).toInt())    
}
