import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

import scala.annotation.tailrec

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val Array(n, k) = in.readLine().split("\\s+").map(_.toLong)

    @tailrec
    def length(n: Long, c: Int): Int = {
      if (n > 0L) {
        length(n / k, c + 1)
      } else {
        c
      }
    }

    out.println(
      length(n, 0)
    )
    out.flush()
  }
}
