#include <iostream>
#include <complex>
using namespace std;

int solve(int a, int b, int n)
{
  double d = (double)a / b;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    res += int(d * pow(10, i)) % 10;
  }
  return res;
}

int main(int argc, char **argv)
{
  int a, b, n;
  while (cin >> a >> b >> n) {
    cout << solve(a, b, n) << endl;
  }
  return 0;
}