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


#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

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