#include <iostream>
using namespace std;

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

int main(){
	int a, b, n;
	while(cin >> a >> b >> n){
		cout << f(a, b, n) << endl;
	}
	return 0;
}