#include<iostream>
using namespace std;

int main(){
	
	int a,b,n;
	while( cin >> a >> b >> n ){
		if( cin.eof() ) break ;
		
		int ans = 0 ,cnt = 0 ;
		while( cnt <= n ){
			if( a == 0 || b == 0 ) break;
			
			
			while( a < b ){
				a *= 10;
				cnt++ ;
			}
			if( cnt <= n ){
				if( cnt > 0 ) ans += a/b;
				a %= b ;
			}
		}
		
		cout << ans << endl ;
	}
}