#include<iostream>
using namespace std;
int a,b,c,n,sum;
long double x;
int main(){
  while(cin>>a>>b>>n){
    x=(long double)a/(long double)b;
    sum=0;
    for(int i=0;i<n;i++){
      x*=10.0;
      c=x;
      x-=(long double)c;
      c%=10;
      sum+=c;
    }
    cout<<sum<<endl;
  }
  return 0;
}