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