import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;

void main()
{
	foreach (line; stdin.byLine) {
		auto x = line.split.map!(to!int).array;

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