function main(arg){
            var arr = arg.split(" ");
            var bs = parseInt(arr[0]).toString(parseInt(arr[1]));
            var res = bs.toString();
            console.log(res.length);
} 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));