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