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

  if (N === 1) {
    console.log(1)
  } else {
    console.log(
      Math.ceil(Math.log(N) / Math.log(K))
    )
  }
}

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