#include <iostream>
using namespace std;

int main()
{
  double a, b, n, m;
  int s, d;

  while (cin >> a >> b >> n){
    s = 0;
    m = a / b;
    while (n--){
      m *= 10.0;
      d = m;
      d %= 10;
      s += d;
    }

    cout << s << endl;
  }
}