#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;
       while(n){
           dec*=10;
           sum+=(int)dec%10;
           n--;
       }
       cout<<sum<<endl;
    }
  
    return 0;
}