object Main extends App {
  val nkInput =  scala.io.StdIn.readLine()
  val nkArray = nkInput.split(" ").map(_.toInt).toSeq
  val n = nkArray(0).toDouble
  val k = nkArray(1).toDouble
  val log = Math.log(n) / Math.log(k)
  println(Math.ceil(log).toInt)

}