#include<iostream>

using namespace std;

int main(){

  double a, b, n;

  while(cin >> a >> b >> n){
    int s = 0;

    a = a/b;
    a -= (int)a;

    for(int i = 0; i < n; i++){
      a*=10;
      s+=(int)a%10;
      a -= (int)a;
    }
    cout << s << endl;
  }
  return 0;

}