#include<bits/stdc++.h>
using namespace std;
int main(){
  double a,b;
  int n;
  while(cin>>a>>b>>n){
    double kake=1;
    for(int i=0;i<n;i++){
      kake*=10;
    }
    int n;
    if((a/b) < 1.0){
      n = (a/b)*kake;
    }else{
      int temp = (a/b);
      n = ((a/b)-temp)*kake;
    }
    //cout<<n<<endl;
    int sum=0;
    while(n){
      sum += n % 10;
      n /= 10;
    }
    cout<<sum<<endl;
  }
}

	