#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
//	cut here before submit 
//	freopen("testcase.snd", "r", stdin);
	string str = "";
	while (getline (cin, str ) ){
		if (str.empty() ){
			break;
		} // end if
		int a,b,n;

		stringstream ss(str);
		ss >> a >> b >> n;

		double d = (double)a/(double)b;
		int nd = a/b;
		double decimal = 10.*(d - nd);
		int sum = 0;
		int i;

		for (i = 0; i < n; ++i){
			int e = (int)decimal;
			sum += e;
			decimal -= (double)e;
			decimal *= 10.;
		} // end for

		cout << sum << endl;

	} // end loop
		
	return 0;
}