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