#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;
		if (a % b == 0){
			cout << '0' << endl;
			continue;
		} // end if

		while (a > b){
			a -= b;
		} // end if	

		vector <int> res;
		int sum = 0;
		int i;
		
		for (i = 0; i < n; ++i){
			int c = (10*a)/b;
			int d = (10*a % b);
			a = d;
			sum += c;
		} // end for
		cout << sum << endl;

	} // end loop
		
	return 0;
}