#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){
	long double ab=(long double)a/b;
	
	char bun[10000];
	sprintf(bun,"%.300Lf",ab);
	int idx=0;
	for(;bun[idx]!='.';idx++);
	
	idx+=i;
	return bun[idx]-'0';
}

main(){
	int a,b,n;
	while(cin>>a>>b>>n){
		int s=0;
		for(int i=1;i<=n;i++){
			s+=f(a,b,i);
		}
		cout<<s<<endl;
	}
}