#include <iostream>
#include <stdio.h>

using namespace std;

void q54() {
	int a, b, n;
	for (; cin >> a >> b >> n;) {
		int ans = 0;
		a = a%b;
		for (int i = 0; i < n; i++) {
			ans += (int)(a * 10 / b);
			a = (a * 10) % b;
		}
		cout << ans << endl;
	}
}
int main() {
	q54();
	return 0;
}