#include<iostream>
using namespace std;
int main(){
long a,b,c,n,s,f,i,j;
while(cin>>a){
cin>>b>>n;
while(a>b)a-=b;
s=0;c=a;
for(i=0;i<n;i++){
c*=10;
for(j=0;j<9;j++){if(c<b)break;c-=b;}f=j;
s+=f;
}
cout<<s<<endl;
}
return 0;
}