#include <iostream>

using namespace std;

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

  while (cin >> a >> b >> n){
    int sum = 0;
    for (int i = 1; i <= n; i++){
      a *= 10;
      s = a / b % 10;
      sum += s;
    }
    cout << sum << endl;
  }

  return (0);
}