#include <iostream>
#include <cmath>
using namespace std;
int a,b,n;

void solve() {
  int sum = 0;
  double c = (double)a/b;
  c = c-floor(c);
  for(int i=0;i<n;i++) {
    c *= 10;
    sum += (int)floor(c);
    c = c-floor(c);
  }
  printf("%d\n",sum);
}

int main() {
  while(cin >> a >> b >> n) {
    solve();
  }
}