#include <stdio.h>

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