#include <stdio.h>
#include <iostream>
#include <math.h>

using namespace std;

int main() {
	int a,b,n;
	long double kari;
	while (cin >> a >> b >> n) {
		int sum = 0;
		kari = (long double)a / (long double)b; 
		kari = kari - (int)kari;
		for (int i = 1; i <= n; i++) {
			kari = kari * 10;
			sum += (int)kari;
			kari = kari - (int)kari;
		}
		cout << sum << endl;
	}
	return 0;
}