#include <iostream>
using namespace std;

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