#include<iostream>
using namespace std;

int num[1000001];

int main() {
	int a, b, n;
	while( cin >> a ) {
		cin >> b >> n;
		
		a = a%b;
		for(int i = 0; i <= n; i++ ) {
			num[i] = a/b;
			a -= num[i] * b;
			a *= 10;
		}
		
		int ans = 0;
		//cout << ".";
		for(int i = 1; i <= n; i++ ) {
			//cout << num[i];
			ans += num[i];
		}
		//cout << endl;
		cout << ans << endl;
	}
	return 0;
}