#include <iostream>
#include <cmath>

using namespace std;

int main(void){

  double a,b,n;
  while( cin >> a >> b >> n ){

    int A;
    int s;
    if( n == 0 ){
      s = 0;
      goto end;
    }
    a = a/b;
    // cout << a << endl;
     A =  a * pow( (double)10 , n );
     //cout << A << endl;
    s = 0;
    for( int i = 0 ; i < n ; i++ ){
      s += A % 10;
      A /= 10;
      //cout << A << endl;
    }
  end:
    cout << s << endl;
  }
  return 0;
}