#include <cstdio>
using namespace std;

int main() {
  int a, b, n, s, t;
  while (scanf("%d %d %d", &a, &b, &n) == 3) {
    s = 0;
    t = a % b;
    for (int i=0; i<n; i++) {
      t *= 10;
      s += t / b;
      t = t % b;
    }
    printf("%d\n", s);
  }
  return 0;
}