object Main{
  def main(args: Array[String]): Unit = {
    var sc = new java.util.Scanner(System.in)
    while(sc.hasNext){
      var a:Double = sc.nextDouble
      var b:Double = sc.nextDouble
      var n:Int = sc.nextInt
      var nor:String = (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)
    }
  }
}