#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 

int main(void){  
  int a,b,n;
  while(cin>>a>>b>>n){
    double c = (double)a/b;
    int s=0;
    for(int i=1; i<=n; i++){
      double d = c;
      REP(j,i) d*=10;
      s += (int)d%10;
    }
    cout << s << endl;
  }
  return 0;

}