#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++) 
using namespace std;
int total;
void rec(int a,int b,int cnt,int limit){
  if(cnt >= limit)return;
  if(a < b){
    rec(a*10,b,cnt+1,limit);
  }
  else{
    if(cnt != 0)total += a/b;
    rec((a-a/b*b)*10,b,cnt+1,limit);
  }
}

int main(){
  int n; double a,b; 
  while(cin >> a >> b >> n){
    //cout << setiosflags(ios::fixed) << setprecision(10) <<  a/b << endl;
    total = 0;
    rec(a,b,0,n+1);  
    cout << total << endl;
  }
  return 0;
}