import Foundation

/*
// 1
let N = Int(readLine()!)!

// 1 2
let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let S = Int(split[1])!

// 1 2 3 4 5
let array = readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
*/

let split = readLine()!.componentsSeparatedByString(" ")
let N = Int(split[0])!
let K = Int(split[1])!
var i = 0

func pow(_ number: Int, multiplier: Int) -> Int {
  var answer = 1
  for _ in 0 ..< multiplier {
    answer *= number 
  }
  return answer
}

while (true) {
  if N == 1 { print(1); break }
  if N < pow(K, multiplier: i) {
  	print(i)
    break
  }
  i += 1
}