#include <iostream>
using namespace std;


int main(){
	int a, b, n;
	while ( cin >> a >> b >> n ){
		int sum = 0;
		double d =static_cast< double >( a ) / b - ( a / b );
		for ( int i = 0; i < n; ++i ){
			d *= 10;
			sum += static_cast< int >( d );
			d -= static_cast< int >( d );
		}
		cout << sum << endl;
	}

	return 0;
}