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