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