#include <iostream>
using namespace std;

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