fun main(args:Array<String>):Unit {
    val (n, k) = readLine()!!.trim().split(' ').map(String::toInt)
    val nums = readLine()!!.trim().split(' ').map(String::toInt)
    val pos = nums.indexOf(1)
    println((n + k - 3) / (k - 1))
}