#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>

using namespace std;

int main()
{
	double a, b;
	int ans;
	long long n, c;

	while(cin >> a >> b >> n)
	{
		long double j = a / b;
		ans = 0;
		for(int i = 0; i < n; i++)
		{
			j *= 10;
			c = floor(j);
			//cout << c % 10 << endl;
			ans += (c % 10);
		}
		cout << ans << endl;
	}
}