#include<iostream>
using namespace std;

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

  while(cin >> a >> b >> n){
    s = 0;
    f = a/b;
    a -= b*f;
    a *= 10;
    for(int i=0;i<n;i++){
      f = a/b;
      s += f;
      a -= b*f;
      a *= 10;
    }
    cout << s << endl;
  }
}