#include <iostream>
using namespace std;

int a, b, n;

int main()
{
	while (cin >> a >> b >> n) {
		int m = 0;

		a %= b;

		for (int i = 0; i < n; i++) {
			a *= 10;
			m += a / b;
			a %= b;
		}

		cout << m << endl;
	}

	return 0;
}
