#include <bits/stdc++.h>
using namespace std;

using db = double;
using ll = long long;
using vi = vector <int>;
#define op operator
#define pb push_back

int main() {
	ios :: sync_with_stdio(0);

	for(int a, b, n; cin >> a >> b >> n; ) {
		int ans = 0;
		a %= b;
		while(n --) {
			ans += a * 10 / b;
			a = a * 10 % b;
		}
		cout << ans << '\n';
	}

	return 0;
}