#include <iostream>

using namespace std;

int f(int a,int b,int num){
	int ans=0;
	a = a%b;
	for(int i=0;i<num;i++){
		a*=10;
		ans += a/b;
		a = a%b;
	}
	return ans;
}

int main(){
	int a,b;
	int n;
	double c;
	while(cin>>a){
		cin>>b;
		cin>>n;
		c = a/(double)b;
		cout<<f(a,b,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
*/