#include <iostream>
#include <cstdio>
#include <math.h>
#include <sstream>
int main(){
	double a, b, n;
	while(~scanf("%lf%lf%lf", &a, &b, &n)){
		for(;a>=b;)a -= b;
		double frac = a / b;
		std::stringstream ss;
		ss << (int)(frac * pow(10, n));
		std::string s = ss.str();
		int res = 0;
		for(int i=0;i<s.size();i++)
			res += s[i] - '0';
		printf("%d\n", res);
	}
	return 0;
}