#include <iostream>
using namespace std;
int main() {
  int a, b, n, i, s;
  while (cin >> a >> b >> n) {
    s = 0;
    a %= b;
    for (i = 0; i < n; i++) { a *= 10; s += (a / b) % 10; a %= b; }
    cout << s << endl;
  }
}