#include <iostream>
using namespace std;

int main() {
	double a, b;
	int n;

	while (cin >> a) {
		cin >> b >> n;

		a /= b;
		int sum = 0;
		for (int i = 1; i <= n; i++) {
			a *= 10;
			int tmp = a;
			sum += tmp % 10;
		}
		cout << sum << endl;
	}
	return 0;
}