#include <cstdio>

using namespace std;

int main(){
	
	double a, b, n;
	double ab, cc;
	int c;
	
	while (scanf("%lf %lf %lf", &a, &b, &n) != EOF){
		c = 0;
		ab = a / b;
		while (ab > 9) ab -= 10;
		for (int i = 0; i < n; i++){
			cc = ab;
			for (int j = 0; j <= i; j++){
				cc *= 10;
			}
			while (cc > 9) cc -= 10;
			c += cc;
		}
		
		printf("%d\n", c);
	}
}