object Main{
  def main(args: Array[String]): Unit = {
    var sc = new java.util.Scanner(System.in)
    while(sc.hasNext){
      var a:Int= sc.nextInt
      var b:Int = sc.nextInt
      var n:Int = sc.nextInt
      var sum:Int = 0
      for(i <- 0 until n){
        a *= 10
        sum += (a/b)%10
        a %= b
        
      }
      println(sum)
    }
  }
}