#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#define int long long
using namespace std;
signed main() {
	int a, b, c;
	while (cin >> a >> b >> c) {
		int r = 0;
		a %= b;
		for (int i = 0; i < c; i++) {
			a *= 10;
			r += a / b;
			a %= b;
		}
		cout << r << endl;
	}
}
