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

int main(){

  int ans,n,a,b;
  double t,u,s;

  while(cin >> a >> b >> n){
    ans = 0;
    s = (double) a / (double) b;

    for(int i=0;i<n;i++){
      s *= 10;
      ans += ((int)s%10);
    }

    cout << ans << endl;
  }
}