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

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

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