#include <iostream>
#include <cmath>

using namespace std;

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