#include <iostream>
#include <cmath>

using namespace std;

main(){
  int a, b, n;
  while(cin >> a >> b >> n){
    int sum=0;
    double tmp=(double)a/b;
    for(int i=0;i<n;i++){
      tmp-=(int)tmp;
      tmp*=10.0;
      sum+=(int)tmp%10;      
    }
    cout << sum << endl;
  }
  return 0;
}