#include<iostream>

#define N 10 << 10

using namespace std;

int main(){

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

    for(int i = 1; i <= n; i++){
      a*=10;
      sum += (a/b) % 10;
      a%=N;
    }
    cout << sum << endl;
  }

  return 0;
}