import scala.io.Source.stdin

object Main extends App {
  stdin.getLines.foreach { s=>
    val n = s.split(" ").map(_.toDouble)
    val div = n(0)/n(1)
    println( ((div-div.toInt)*Math.pow(10,n(2))).toInt.toString.map(_.asDigit).sum )
  }
}