#include <iostream>

using namespace std;

int main() {
	int a, b, n, sum;
	while (1) {
		cin >> a >> b >> n;
		if (cin.eof())
			break;

		sum = 0;
		while (n-->0) {
			a *= 10;
			sum += (a / b) % 10;
			a %= b;
		}
		cout << sum << endl;
	}
	return 0;
}