#include <cstdio>
using namespace std;

int a, b, n;

int main() {
  while (1) {
    if (scanf("%d%d%d", &a, &b, &n) != 3) return 0;
    int ans = 0;
    for (int i=0; i<n; i++) {
      a -= a/b*b;
      a *= 10;
      int t = a/b;
      ans += t;
    }
  
    printf("%d\n", ans);
  }
}