#include <iostream>

using namespace std;

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