#include <iostream>
#include <cmath>

using namespace std;

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

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

  return (0);
}