import java.util._
import scala.io.StdIn._
 
object Main {
    def main(args: Array[String]): Unit = {
      var list = ""
      while((list = readLine)!= null){
        var temp = list.split(" ").map(_.toDouble)
        var mod = temp(0) / temp(1)
        mod -= Math.floor(mod)
        var n = temp(2).toInt
        var sum = new Array[Int](n)
        for(i <- 0 until n){
          sum(i) = (mod.toString + "0000000").charAt(i + 2 ) - '0'
        }
        println(sum.sum)
      }
    }
}