#include <string>
#include <iostream>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

const double EPS = 1e-9;

int main(){
	double a, b;
	int n;

	while(cin >> a >> b >> n){
		double d = a/b;
		d -= (int)d;
		long long id = d * 100 * 10000 * 10000;
		int f[10];

		for(int i = 0; i < 10; i++){
			f[9-i] = id%10;
			id/=10;
		}
		int s = 0;
		for(int i = 0; i < n; i++){
			s += f[i];
		}

		cout << s << endl;
	}

	return 0;
}