#include <stdio.h>
int main(){
	int n,s,i;
	double a,b,q;
	while(scanf("%lf%lf%d",&a,&b,&n)!=EOF){
		s=0;
		q=a/b;
		for(i=0;i<n;i++){
			q-= (int)q;
			q*=10;
			s+=(int)q%10;
		}
		printf("%d\n",s);
	}
	return 0;
}