#include <iostream>
#include <cstdio>
#include <cmath>
#include <sstream>
using namespace std;

int main(){
	stringstream ss;
	string s;
	int a, b, n,cnt,an;
	double ans,iptr;
	while (cin >> a >> b >> n){
		ss.str("");
		ss.clear(stringstream::goodbit);
		cnt = 0;
		ans = modf((double)a / (double)b,&iptr) * pow(10.0,(double)n);
		ans = floor(ans);
		ss << ans;
		s = ss.str();
		for (int i = 0; i < s.size() && s[i] != '.'; i++){
			cnt += s[i] - '0';
		}
		cout << cnt << endl;
	}
	return 0;
}