#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int getPSum( int a, int b, int n )
{
	double c = (double)a / b;

	int res = 0;
	for ( int i = 0; i < n; i++ )
	{
		c *= 10;
		res += (int)c % 10;
	}

	return res;
}

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

	while ( cin >> a >> b >> n )
	{
		cout << getPSum( a, b, n ) << endl;
	}

	return 0;
}