#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 c,s=0;
		double wk = a * 1.0 / b;
		rep(i,n){
			wk *= 10;
			s += (int)(wk) % 10;
			
		}
		cout << s << endl;
	}
	return 0;
	
	
}