#include<iostream>
using namespace std;

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