#include <iostream>
using namespace std;

int main(){
  int a,b,n,sum;
  while(1){
    cin >> a >> b >> n;
    if(cin.eof()) break;

    double f = (double)a/(double)b;
  	int sum = 0;
  	while(n--){
  	    f *=10;
  	    sum += (int)f%10;
  	    f = f - (int)f;
  	}
  	cout << sum << endl;
  }
  return 0;
}