#include <iostream>
using namespace std;

int main() {

  long long int a, b, n;

  while( cin >> a >> b >> n ) {

    a %= b;
    long long int ans = 0;
    for ( long long int i = 0; i < n; i++ ) {
      a *= 10;
      ans += ( a / b );
      a %= b;
    }
    cout << ans << endl;

  }

  return 0;

}