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