#include <iostream>
using namespace std;

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