#include <cstdio>
#include<iostream>

using namespace std;
 
int main(void){

	int a,b,n,sum;
	double dec;

	while(cin>>a>>b>>n){
		dec=(double)a/b;
		sum=0;
		for(int i=0;i<n;i++){
			dec*=10;
			sum+=(int)(dec)%10;
		}
		cout<<sum<<endl;
	}

    return 0;
}