#include <iostream>
using namespace std;

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