#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){  
  long long a,b,n;
  while(cin>>a>>b>>n){
    /*
    long long s=0;
    bool second = false;
    int f[100]; //(int)((double)a*10/b)%10
    for(int i=0; i<n; i++){
      double c = (double)a / b * pow(10,(double)i+1) ;
      f[i] = (int)c%10;
      //if((int)c%10==0) break;
      for(int k=0; k<i; k++){
        if(f[i]==f[k]){
          second = true;
          for(int j=i; j<n; j++){
            s+=f[(j-k)%(i-k)+k];
          }
        break;
        }
      }
      if(second) break;
      s += (int)c%10;
    }
    */
    long long s = 0;
    long long amari;
    long long f[10000] = {0};
    amari = a%b * 10;
    bool second = false;
    for(int i=0; i<n; i++){
      s+=amari/b;
      amari = amari%b*10;
      /*
      for(int j=0; j<=i; j++){
        if(amari[i+1]==amari[j]){
          for(int k=i+1; k<n; k++){
            s+=(f[(k-j)%(i+1-j)+k]);
          }
          second = true;
          break;
        }
      }
      if(second) break;
      */
    }
    cout << s << endl;
  }
  return 0;

}