#include <iostream>

using namespace std;

int main(void){
  int a,b,n;

  while(cin >> a >>b >> n){
    double d = (double)a/b;
    int ret=0, tmp;
    double dtmp;
    for(int i=0;i<n;i++){
      dtmp = d;
      for(int j=0;j<=i;j++){
	dtmp *= 10;
      }
      tmp = (int)dtmp % 10;
      //cout << tmp << " ";
      ret += tmp;
    }
    cout << ret << endl;
  }
}