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

int main() {
  int a, b, n;
  while(cin >> a >> b >> n) {
    int s = 0;
    long long d = 10;
    for(int i = 0; i < n; ++i) {
      s += (a*d/b)%10LL;
      d *= 10LL;
    }
    cout << s << endl;
  }
  return 0;
}