#include<iostream>

using namespace std;

int main(){

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

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

  return 0;
}