function main(input) {
  const inputs =input.split('\n')
  const [N, K] = inputs[0].split(' ').map(Number)

  console.log(
    Math.ceil(Math.log(N) / Math.log(K))
  )

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
