import scala.io.StdIn._
object Main {
	def main(args: Array[String]): Unit = {
	  while(true){
	    var temp = readLine.split(" ").map(_.toDouble)
	    var nor:Double = temp(0) / temp(1)
	    var sum = new Array[Double](temp(2).toInt);
	    for(i <- 0 until temp(2).toInt){
	      sum(i) = (((nor - Math.floor(nor)).toString + "00000000").charAt(i + 2) - '0').toDouble
	    }
	    println(sum.sum.toInt)
	  }
	}
}