#include <iostream>
using namespace std;

int main() {
  int a, b, n;
  while(cin >> a >> b >> n) {
    int s = 0;
    while(n--) {
      a = a%b*10;
      s += a/b%10;
    }
    cout << s << endl;
  }
  return 0;
}