const fs = require("fs");

function main(input) {
  const tmp = input.split(" ").map(v => parseInt(v));
  const n = tmp[0];
  const k = tmp[1];
  console.log(process(n, k));
}

function process(n, k) {
  return n.toString(k).length;
}

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