//$ node B.js < B.txt
function Main(input) {
  input = input.split('\n') // 1行目がinput[0], 2行目がinput[1], …に入る
  for(var i=0;i<input.length;i++){
    var tmp = input[i].split(' ')
    input[i] = []
    for(var ii=0;ii<tmp.length;ii++){
      input[i].push(tmp[ii])
    }
  }

  //A×N+B×d(N)
  var ans = 0
  a = input[0][0] *1
  b = input[0][1] *1
  x = input[0][2] *1
  /*
  for(var i=0;i<100000000000;i++){
    var c = a*i+b*((i+'').length)
    //console.log(i + ' ' + c)
    if(x<c){
      ans = i-1
      break
    }
  }
  */

  for(var i=1;i<1000000000000;i=i*10){
    var c = a*i+b*((i+'').length)
    
    if(x<c){
    //console.log(i + ' ' + c)
      
      for(var ii=Math.floor(i/10);ii<100000000001;ii++){
        //console.log('ii'+ii)
        var cc = a*ii+b*((ii+'').length)
        //console.log(i + ' ' + c)
        //console.log(`x${x}c${cc}`)
        if(x<cc){
          ans = ii-1
          break
        }
      }
      break
      
    }
    
  }

  if(ans==-1){
    console.log(0)
  }else{
    console.log(ans)
  }

}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));