object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt()
    val k = sc.nextInt()

    val ans = Math.ceil(Math.log(n) / Math.log(k))

    println(ans.toInt)
  }
}
