#include <iostream>
#include <cmath>

using namespace std;

int main(void){

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

    a = a/b;

    int A =  a * pow( (double)10 , n );
    int s = 0;
    for( int i = 1 ; i <= n ; i++ ){
      s += A % 10;
      A /= 10;
    }
    cout << s << endl;

  }
  return 0;
}