#include <iostream>
using namespace std;


int main(){
	int a, b, n;
	int s;

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

	return 0;
}