'use strict'

function Main(input) {
  input = input.trim().split(' ')
  
  const n = parseInt(input[0], 10)
  const s = n.toString(parseInt(input[1]))
  console.log(s.length)
  
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));