#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;

int main() {
	long long int a,b;
	int n;
	vector<int> r;
	while (cin >> a >> b >> n)
	{
		int sum=0;
		a = a % b;
		for (int i=0; i<n; i++)
		{
			a*=10;
			sum += (a/b)%10;
		}
		r.push_back(sum);
	}
	for (int i=0; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}

}