#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdlib>
using namespace std;

std::string float_to_string(float f, int digits)
{
	ostringstream oss;
	oss << setprecision(digits) << setiosflags(ios::fixed) << f;
	return oss.str();
}

int main(){
	int a, b, n;
	int s=0;
	std::string str;

	while(cin>>a>>b>>n){
		str = float_to_string(float(a)/b, n);
//		cout<<str<<endl;
		for(unsigned int i=str.length()-1;i>str.length()-n-1;--i){
//			cout<<str[i]<<endl;
//			cout<<atoi(&(str[i]))<<endl;
			s += atoi(&(str[i]));
			str[i]=0;
		}
		cout<<s<<endl;
	}

	return 0;
}