#include <stdio.h>

int main(void){
	int a,b,n,next;
	int sum;
	
	while (scanf("%d%d%d", &a, &b, &n)!=EOF){
		sum = 0;
		for (int i=0; i<n;i++){
//			printf("%d %d %d\n", a, b, sum);
			next = a*10 % b;
			sum += (a*10 / b) % 10;
			a = next;
			if (a==0) break;
		}
		printf("%d\n", sum);
	}
	
	return 0;
}