import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt()
  val k = sc.nextInt()

  var str = ""
  var x = n
  while (x > 0) {
    val r = x % k
    str = r.toInt + str
    x = x / k
  }
  println(str.length)
}
