object Main extends App {
  import scala.io.StdIn._



  val Array(n, k) = readLine.trim.split(' ').map(_.toInt)
  var depth = 1
  var used = 1
  var rest = n - 1
  while ((used + k - 1) / k <= rest){
    val use = (used + k - 1) / k
    depth += 1
    used += use
    rest -= use
  }
  println(depth)
}
