"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let N = xs[0];
   let K = xs[1];
   let ans = N.toString(K);
   console.log(ans.length);
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));