#include <bits/stdc++.h>
using namespace std;

int main() {
	int a, b, n;
	while(cin >> a >> b >> n){
		int ans = 0;
		a %= b;
		for(int i = 1; i <= n; ++i){
			a *= 10;
			ans += a / b;
			a %= b;
		}
		printf("%d\n", ans);
	}
	return 0;
}