#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
using namespace std;
int inf = 1000000000;

int main(void) {
  int a, b;
  int n;
  while(cin >> a >> b >> n){
    int ans = 0;
    a %= b;
    for(int i=0; i<n; i++){
      a *= 10;
      ans += (a/b);
      a %= b;
    }
    cout << ans << endl;
  }




  return 0;
}

// EOF