#include<iostream>

#define N 10 << 8

using namespace std;

int main(){

  unsigned long a, b;
  int n;
  while(cin >> a >> b >> n){
    int sum = 0;
    int rev = 10;

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

  return 0;
}