#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;



int main(){
	int a,b,n,sum;
	while( scanf("%d %d %d",&a,&b,&n) != EOF){
		a = a%b;
		sum = 0;
		for(int i=0;i<n;i++){
			a *= 10;
			sum += a/b;
			a = a%b;
			if(a==0)break;
		}
		printf("%d\n",sum);
	}
			
	return 0;
}
