#include <iostream>
#include <cmath>
using namespace std;
int main(){
	double a,b,res;
	int n,s;
	while(cin >> a >> b >> n){
		res = a / b;
		s = 0;
		for(int i = 0;i < n;++i){
			res *= 10.0;
			s += (int)(res) % 10;
		}
		cout << s << endl;
	}
}