import std.stdio,std.string,std.conv;

int main()
{
	string s;
	while((s = readln.chomp).length != 0)
	{
		string[] _s = s.split(" ");
		int a = _s[0].to!int;
		int b = _s[1].to!int;
		int n = _s[2].to!int;
		int ans = 0;
		a %= b;
		foreach(i;0..n)
		{
			a *= 10;
			ans += (a/b);
			a %= b;
		}
	
		ans.writeln;
	}
	return 0;
}