#include "math.h"
#include <iostream>

using namespace std;

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