object Main extends App {
    val in = io.Source.stdin.getLines.map(_.split(" ").map(_.toInt))
    for (Array(a, b, n) <- in) {
        var i = n
        var rem = a % b
        var res = 0
        while (i > 0) {
            rem *= 10
            res += rem / b
            rem %= b
            i -= 1
        }
        println(res)
    }
}