import scala.io.Source.stdin

object Main {
  def getSum(i:Int,a:Int,b:Int,sum:Int):Int =
    if(i<0) sum else getSum(i-1,(a%b)*10,b,sum+(a/b))

  def main(args:Array[String]) = {
    stdin.getLines.foreach { s =>
      val n = s.split(" ").map(_.toInt)
      val a = if(n(0) >= n(1)) n(0)-(n(0)/n(1))*n(1) else n(0)
      println(getSum(n(2),a,n(1),0))
    }
  }
}