#include<iostream>
#include<cmath>

using namespace std;

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

	while (cin >> a >> b >> n){
		s = 0;

		for (int i = 0; i < n; ++i){
			s += (a * 10 / b) - floor((a / b)) * 10;
			a *= 10;
		}

		cout << s << endl;
	}

	return 0;
}