#include<iostream>
#include<cstdio>
using namespace std;


int main(){
  int n;
  double a,b;
  while(cin >> a >> b >> n){
    double tribe = a/b;
    char ss[100000];
    string s;
    sprintf(ss,"%.15f",tribe);
    s = ss;
    int sum = 0;
    for(int i=2;i<=n+1;i++){
      if(i >= s.length())break;
      sum+=s[i]-'0';
    }
    cout << sum << endl;
  }
  return 0;
}