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

int main()
{
	double a,b;
	int n;
	while( scanf("%lf %lf %d",&a,&b,&n) != EOF){
		double div = a/b;
		
		div = div - (int)div;
		div *= (int) pow(10, n);
		stringstream ss;
		ss<<(int)div;
		string s = ss.str();
		int sum=0;
		for(int i=0;i<n;i++){
			sum += s[i] - '0';
		}
		
		cout<<sum<<endl;
	}
	return 0;
}