#include<iostream>
#include<math.h>

int a, b, n;
int ans = 0;

int main()
{
	while( std::cin >> a >> b >> n ){
		ans = 0;
		
		a %= b;
		
		while( n-- ){
			ans += ( a * 10 ) / b;
			a = ( a * 10 ) % b;
		}
		
		std::cout << ans << std::endl;
	}

 	return 0;
}