#include <iostream>
using namespace std;

int main()
{
  int a, b, n, s;

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

    cout << s << endl;
  }
}