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

int main(void){
	double a,b;
	int c;
	while(cin >> a >> b >> c){
		long double f=a/b;
		long double k=(int)f;
		string str;
		stringstream ss;
		ss << f-k;
		ss >> str;
		int ans=0;
		for(int i=2;i<2+c;i++){
			if(str.size()<=i)break;
			ans+=str[i]-'0';
		}
		cout << ans << endl;
	}
    return 0;
}