#include<iostream>
#include<vector>
int main()
{
	while (true)
	{
		int a, b, n;
		std::cin >> a >> b >> n;
		if (std::cin.eof())
		{
			break;
		}
		std::vector<int>digit(n);
		a %= b;
		int quotient = 0, remainder = a;
		for (int i = 0; i < n; i++)
		{
			remainder *= 10;
			quotient = remainder / b;
			remainder -= quotient * b;
			digit[i] = quotient;
		}
		int sum = 0;
		for (auto i : digit)
		{
			sum += i;
		}
		std::cout << sum << std::endl;
	}
	return 0;
}
