#include <stdio.h>

int main(void){
	int a, b;
	int n;
	int ans;

	while(scanf("%d %d %d", &a, &b, &n) != EOF){
		ans = 0;

		int d = a % b;
		d *= 10;
		for(int i=0; i<n; i++){
			ans += d / b;
			d = d % b;
			d *= 10;
		}
		printf("%d\n", ans);
	}

	return 0;
}