fun main(args : Array<String>) {
    val (n, k) = readLine()!!.split(" ").map { it.toInt() }
    val num = tenToRadix(n, k)

    println(num.toString().length)
}

fun tenToRadix(num:Int,mathRadix:Int):String{
    var funNum = num
    var result:String = ""
    while(funNum >= mathRadix){
        result = result+Integer.toString(funNum%mathRadix)
        funNum = funNum/mathRadix
    }
    result = result+Integer.toString(funNum)
    return result.reversed();
}