"use strict";
function main(input) {
  let kari = input[0].trim().split(" ");
  let n = parseInt(kari[0]);
  let r = parseInt(kari[1]);

  n = n.toString(r);

  console.log(n.length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));