#include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class t>
using table = vector<vector<t>>;
const ld eps=1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.answer"

int main() {
	int a, b, n;
	while (cin >> a >> b >> n) {
		a %= b;
		a *= 10;
		int ans = 0;
		for (int i = 0; i < n; ++i) {
			ans += a / b;
			a %= b;
			a *= 10;
		}
		cout << ans << endl;
	}
	return 0;
}