#include <iostream>
#include <cmath>
using namespace std;

long double c;

int f( int n ) {
  return ( (int)( c * pow( 10.0, n ) ) ) % 10;
}

int main() {
  long double a, b;
  int n;
  
  while( cin >> a >> b >> n )  {
    c = a / b;
    int s = 0;
    for( int i = 1; i <= n; i ++ ) {
      s += f(i);
    }

    cout << s << endl;
  }
  
  return 0;
}