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

using namespace std;


int main(){

	int a,b,n,sum;

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

		sum = 0;
		a = 10*(a % b);
		for(int i=0; i < n; i++){
			sum += a/b;
			a = 10*(a % b);
		}

		printf("%d\n",sum);
	}

	return 0;
}