#include<iostream>
using namespace std;

int main(){

  int ans,a,b,n;
  double k;

  while(cin >> a >> b >> n){
    k = (double)a / (double)b;
    ans = 0;

    if(b != 0){
      for(int i=0;i<n;i++){
	k *= 10;

	ans += (int)k%10;
      }
    }

    cout << ans << endl;
  }
}