#include <iostream>

using namespace std;

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

	while (1) {
		cin >> a >> b >> n;
		if (cin.eof())	break;

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

		cout << s << endl;
	}

}