#include <cstdio>

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