#include <iostream>
#include <set>
#include <deque>
#include <cstdlib>
using namespace std;

int main() {
  int a, b, n;
  while( cin >> a ) {
    cin >> b >> n;
    int i, r;
    set<int> rems;
    deque<int> q;
    deque<int> ssum;
    a %= b;
   
    for( i = 0; ; i++ ) {
      a *= 10;
      r = a / b;
      if( rems.find( r ) != rems.end() || r == 0 ) { break; }
      rems.insert( r );
      q.push_back( r );
      ssum.push_back( i == 0 ? r : ssum[ i - 1 ] + r );
      a -= r * b;
//      cout << i << " " << r << endl;
    }
    if( r == 0 ) {
      cout << ssum[ min( i - 1, n - 1 ) ] << endl;
    } else { 
      int looplen = q.size();
      int ans = ssum.back() * ( n / looplen );
      ans += ( n % looplen == 0 ? 0 : ssum[ n % looplen - 1 ] );
      cout << ans << endl;
    }
  }
  return EXIT_SUCCESS;
}