import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, k) = in.readLine.split(" ").map(_.toInt)
  val seq = in.readLine.split(" ").map(_.toInt)
  val ans = ((n-1) + (k-2)) / (k-1)
  println(ans)
}