#include<cstdio>

using namespace std;

int a,b,n;

int main(void){
	while(~scanf("%d%d%d",&a,&b,&n)){
		int sum=0;
		a=a%b;
		for(int j=0;j<n;j++){
			a*=10;
			sum+=a/b;
			a=a%b;
		}
		printf("%d\n",sum);
	}
	return 0;
}