#include <iostream>

using namespace std;

int f(double c,int num){
	double tmpC = c;
	int ans = 0;
	for(int i=1;i<=num;i++){
		tmpC = c;
		for(int j=0;j<i;j++){
			tmpC *= 10;
		}
		ans += (int)tmpC%10;
	}

	return ans;
}

int main(){
	int a,b,n;
	double c;
	while(cin>>a){
		cin>>b;
		cin>>n;
		c = a/(double)b;
		cout<<f(c,n)<<endl;
	}

	return 0;
}

/*
Sample Input
1 2 3
2 3 4
5 4 3
4 3 2
Output for the Sample Input
5
24
7
6
*/