#include <iostream>
#include <cstdio>

using namespace std;

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