#include <iostream>
#include <math.h>
using namespace std;
int main( void )
{
	int a, b, n;
	while ( cin >> a >> b >> n )
	{
		long double c = (long double)a / (long double)b;

		c -= floor( c );

		int kotae = 0;
		for ( int i = 0; i < n; i++ )
		{
			c *= 10.0;
			int d = (int)floor( c );
			c = c - floor(c);
			kotae += d;
		}
		cout << kotae << endl;

	}

	return 0;
}