#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a; i ++)
int main(void){
  int a,b,n;
  while(cin>>a>>b>>n){
    int res = 0;
    double now = (double)(1.0*a/b);
    int po = 1;
    
    rep(i,n)po *= 10;
    po = now * po;
    //cout<<po<<" "<<now<<endl;
    rep(i,n){
      res += po%10;
      po /= 10;
    }
    
    /*
    rep(i,n){
   
      res += (int)(now*10)%10/1;
      now *= 10;
    }
    //*/
    cout<<res<<endl;
  }
}