#include <iostream>
using namespace std;
const int INF = 1 << 28;
signed main(){
	int a, b, n;
	while (cin >> a){
		cin >> b >> n;
		int s = 0;
		for (int i = 0; i<n; i++) 
			s += (a*=10)/b % 10;
		cout << s << endl;
	}
	return 0;
}