function main (input) {
  const row = input.split(' ').map((x) => parseInt(x))
  const n = row[0]
  const k = row[1]
  console.log(n.toString(k).length)
}

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