#include <stdio.h>
#include <math.h>

int main(void)
{
	double a, b;
	double f;
	double ff;
	int t;
	int n;
	int i;
	int ans;
	
	while (scanf("%lf %lf %d", &a, &b, &n) != EOF){
		f = a / b;
		ans = 0;
		for (i = 0; i < n; i++){
			f *= 10;
			ff = floor(f);
			t = ff;
			t %= 10;
			ans += t;
		}
		printf("%d\n", ans);
	}
	return (0);
}