import std.stdio;
import std.string;
import std.conv;
import std.array;
import std.algorithm;



void main() {
    string[] input = new string[](3);

    while ((input = readln.chomp.split(" ")).length != 0) {
        auto sum = 0;
        auto data = input.map!(to!int).array;

        data[0] %= data[1];
        foreach (i; 0..data[2]) {
            data[0] *= 10;
            sum += data[0] / data[1];
            data[0] %= data[1];
        }

        writeln(sum);
    }
}