import Foundation

let inputs = readLine()!.components(separatedBy: " ").map{ Double($0)! }
let N = inputs[0]
let K = inputs[1]
var digits = 0

for i in 0...100{
    if N >= pow(K, Double(i)) {
        digits += 1
    }
}

print(digits)