function Main(input) {
  input = input.split(" ");
  var A = input[0];
  var B = input[1];
  var X = input[2];
  var l = 0;
  var r = 1000000001;
  function f(cf){
    return A*cf+B*(String(cf).length);
  }
  while(r-l > 1){
    var c = Math.floor((l+r)/2);
    if(f(c) <= X){
      l = c;
    }else{
      r = c; 
    }
  }
  console.log(l);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));