#include <iostream>

using namespace std;

/** Problem0054 : Sum of Nth decimal places **/
int main()
{
	int a, b, n, s;
	
	while (cin >> a >> b >> n) {
		s = 0;
		a*=10;
		for (int i=0; i<n; i++) {
			s += (a/b)%10;
			a %= b;
			a *= 10;
		}
		cout << s << endl;
	}
}