#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>

#define X first
#define Y second
using namespace std;

int main(){
	int a, b;
	int n;
	while(cin >> a >> b >> n){
		if(cin.eof()) break;
		int div = a%b*10;
		int sum = 0;
		for(int i = 0; i < n; i++){
			sum += div/b;
			div = div%b*10;
		}
		cout << sum << endl;
	}
	return 0;
}