#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
     
	int a,b,n;
	
	while(cin>>a>>b>>n){
		int s=0;
		a%=b;
		for(int i=1;i<=n;i++){
			a*=10;
			s+=a/b;
			a%=b;
		}
		
		cout<<s<<endl;
	}

}