object Main{
  def main(args: Array[String]): Unit = {
    var sc = new java.util.Scanner(System.in)
    while(sc.hasNext){
      var a = sc.nextDouble
      var b = sc.nextDouble
      var n = sc.nextInt
      var nor = (a/b - Math.floor(a/b)).toString() + "00000000"
      var list = new Array[Int](n)
      for(i <- 0 until n){
        list(i) = nor.charAt(i + 2) - '0'
      }
      println(list.sum.toInt)
    }
  }
}