#include <iostream>
#include <cstdio>
#include <cstdlib>

using namespace std;

int main() {
	double f, a, b, n;
	while (scanf("%lf %lf %lf", &a, &b, &n) != EOF) {
		f = a / b;
		char str[1000];
		sprintf(str, "%.995lf", f);
		int sum = 0, j;
		for (int i = 0; i < 1000; i++) {
			if (str[i] == '.') {
				j = i + 1;
			}
		}
		for (int i = 0; i < n; i++, j++) {
			char c = str[j];
			sum += atoi(&c);
		}
		cout << sum << endl;
	}
	return 0;
}