#include<iostream>
using namespace std;

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

    cout << sum << endl;
  }

  return 0;
}
      
  