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

int main(){

  int a,b,n,k;
  double c;
  stringstream ss;

  while(cin >> a >> b >> n){

    c = (double)a/(double)b;
    ss << c;

    for(int i=0;i<100;i++){
      if(ss.str()[i] == '.') k = i;
    }

    c = 0;

    for(int i=k+1;i<n+k+1;i++){
      if(ss.str()[i] >= 48 && ss.str()[i] <= 57) c += (ss.str()[i] - 48);
    }
 
    cout << c << endl;
 
  }
}