#include <cstdio>

int main()
{
  int a, b, n;
  while (~scanf("%d %d %d", &a, &b, &n)) {
    int ans = 0;
    double tmp = a / static_cast<double>(b) * 10;
    for (int i = 0; i < n; ++i, tmp *= 10)
      ans += static_cast<int>(tmp) % 10;
    printf("%d\n", ans);
  }
  return 0;
}