#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

int main(){
	int a,b,n;
	while(scanf("%d%d%d",&a,&b,&n)!=EOF){
		
		
		int sum = 0;
		rep(i,n){
			int ca = a;
			int cb = b;
			
			rep(j,i+1){
				ca = ca%cb;
				ca*=10;
			}
			
			double c = (double)ca/cb;
			
			int t = int(c);
			sum+=t;
			//printf("!%d ",t);
		}
		
		printf("%d\n",sum);
	}
}