#include <iostream>
using namespace std;

int de(double a, double b, int i){
	double c;
	double d = 1;
	for(int j = 0; j < i; j++) d = d * 10;
	c = a / b - (int)(a / b);
	c = c * d;
	return ((int)c % 10);
}

int main(){
	double a, b;
	int n;
	while(cin >> a >> b >> n){
		int total = 0;
		for(int i = 1;i <= n;i++){
			total += de(a,b,i);
		}
		cout << total << endl;
	}
	return 0;
}