#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

int main(){

	int a, b, n;
	
	while(cin>>a>>b>>n, !cin.eof()){
	
		int sum = 0;
		
		a = a%b;
		
		for(int i=0; i<n; ++i){
			a *= 10;
			sum += a/b;
			a = a%b;
		}
		
		cout << sum << endl;
	}
	
	return 0;
}