#include <iostream>
#include <cmath>

using namespace std;

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