var input = require("fs").readFileSync("/dev/stdin", "utf8");

var words = input.split(' ');
var A = Number(words[0]);
var B = Number(words[1]);
var X = Number(words[2]);

var result = 0;

var left = 1;
var right = 1000000000;
while (left <= right) {
    var middle = Math.floor((left + right) / 2);

    var value = A * middle + B * (Math.floor(Math.log10(middle)) + 1);
    if (value <= X) {
        result = middle;
        left = middle + 1;
    } else {
        right = middle;
    }
}

console.log(result);