#include <iostream>
using namespace std;

int main() {
	int a,b,n,s,i;
	
	while(cin>>a>>b>>n){
		
		a=(a%b)*10;
		
		for(s=0,i=n;i;--i){
			s += a/b;
			a = a%b;
			a*=10;
		}
		cout << s << endl;
	}
	return 0;
}