#include<iostream>
using namespace std;
int main() {
	int a, b, n;
	while (cin >> a >> b >> n, cin) {
		a %= b;
		long double p = (double)a / b;
		int ans = 0;
		for (int i = 0; i < n; i++) {
			p *= 10;
			ans += (int)p;
			p -= (int)p;
		}
		cout << ans << endl;
	}
	return 0;
}
