#include <bits/stdc++.h>
using namespace std;

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

