#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(){
    int a, b;
    int n;
 
	while(cin >> a >> b >> n){
		int s = 0;
		int f = a;

		for(int i = 0; i < n; i++){
			f = f%b*10;
			s += f/b;
		}

		cout << s << endl;
	}
	

    return 0;
}