#include <iostream>

int main()
{
	int a, b, n;
	
	while (std::cin >> a >> b >> n) {
		int s = 0;
		for (int i = 0; i < n; ++i) {
			a = 10 * (a % b);
			s += a / b;
		}
		std::cout << s << std::endl;
	}
	
	return 0;
}