#include<iostream>

using namespace std;

int main(){

  int a, b, n;
  while(cin >> a>>b>>n){
    double sum;
    sum = (double)a/ b;
    sum -= (int)sum;

    int s = 0;

    for(int i = 0; i < n; i++){
      sum *= 10;
      s += (int)sum;
      sum -= (int)sum;
    }

    cout << s << endl;
  }

  return 0;
}