#include <cstdio>
#include<iostream>
 
using namespace std;
  
int main(void){
 
    long long a,b,n,sum;
    long double dec;
 
    while(cin>>a>>b>>n){
        if(b>0) dec=(long double)a/b;
		else{
			cout<<"0"<<endl;
			continue;
		}
        sum=0;
        for(int i=0;i<n;i++){
            dec*=10;
            sum+=(long long)(dec-0.5)%10;
        }
        cout<<sum<<endl;
    }
 
    return 0;
}