#include<iostream>
using namespace std;

int main(){

  int a, b, n, sum;
  
  while(cin >> a >> b >> n){
    sum = 0;
    for(int i=1; i<=n; i++){
      sum += a % b * 10 / b;
      a = a % b * 10 % b;
    }
    
    cout << sum << endl;
  }

  return 0;

}