#include <iostream>
#include <cmath>
using namespace std;
int main(){
  double a,b,n;
  int sum,s,p;
  while(  cin >> a >> b >> n ){
    sum = 0;
    for(int i = 1 ; i <= n ; i++){

      s = (a/b)*pow(10,i);
      sum += s%10;
    }
    cout << sum << endl;
}
}