#include <cstdio>

int A, B, N;

int solve() {
  int t = A % B;
  int ans = 0;

  for (int z = 0; z <= N; ++z) {
    ans += t / B;
    t %= B;
    if (B >= t)
      t *= 10;
  }
  return ans;
}

int main() {
  while (scanf("%d%d%d", &A, &B, &N) != -1) {
    printf("%d\n", solve());
  }
  return 0;
}