function Main(input) {
    input = input.split("\n")
    const line = input[0]
    const items = line.split(" ")
    const n = parseInt(items[0])
    const k = parseInt(items[1])
    const ans = n.toString(k)
    console.log(ans.length)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"))
