"use strict";
main(
  require("fs")
    .readFileSync("/dev/stdin", "UTF-8")
    .trim()
    .split("\n")
);

function main(input) {
  input = input[0].split(" ").map(Number);

  console.log(input[0].toString(input[1]).length);
}
