#include <cstdio>

using namespace std;

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