#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <climits>
#include <sstream>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;


int f(int a,int b,int i){
	int idx=0;
	int s=0;
	a=a-a/b*b;
	while(idx<i){
		a*=10;
		s+=a/b;
		++idx;
		a=a-a/b*b;
	}
	return s;
}

main(){
	int a,b,n;
	while(cin>>a>>b>>n){
		cout<<f(a,b,n)<<endl;
	}
}