#include <iostream>
#include <math.h>
using namespace std;

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

	while (cin >> a >> b >> n)
	{
		int x;
		int ans = 0;
		for (int i = 1; i <= n; i++)
		{
			x = pow(10, i) * (a / b);
			ans += x % 10;
		}
		cout << ans << endl;
	}

	return 0;
}