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

void main(){

    while(true){
	auto a = readln();
	if(stdin.eof()) break;
	auto s1 = split(a);
	real n = to!real(s1[0]) / to!real(s1[1]);
	long sum = 0;
	int s = to!int(s1[2]);
	n = n - to!int(n);
	for(int i=0;i<s;i++){
	    n *= 10;
	    sum += to!int(n)%10;
	    n = n - to!int(n);
	}
	writeln(sum);
    }
}