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