#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;

int main(){
	double a, b, comp;
	int n;
	while (cin >> a >> b >> n){
		int sum = 0;
		comp = a / b;
		for (int i = 1; i <= n; i++){
			sum += (int)(comp / pow(10, -i)) % 10;
		}
		printf("%d\n", sum);
	}
	return 0;
}