#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
int main(){
  int a, b, n;
  while(cin >> a >> b >> n){
    int ans = 0;
    double d = (double)a / b;
    
    for(int i = 0 ; i < n ; i++){
      d *= 10;
      //cout << d << endl;
      ans += (int)d % 10;
    }
    cout << ans << endl;
  }
  return 0;
}